Added test for non-existant deletion

ref #17
This commit is contained in:
Nicolai Ort 2020-12-09 19:20:33 +01:00
parent 5845a91f15
commit 6396fffc04
1 changed files with 10 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import { config } from '../../config';
const base = "http://localhost:" + config.internal_port
// ---------------
describe('adding + updating name', () => {
describe('adding + deletion (successfull)', () => {
let added_org_id
let added_org
describe('adding org', () => {
@ -36,4 +36,12 @@ describe('adding + updating name', () => {
expect(res3.headers['content-type']).toContain("application/json")
});
});
});
});
// ---------------
describe('adding + deletion (non-existant)', () => {
it('delete', async () => {
const res2 = await axios.delete(base + '/api/organisations/0', { validateStatus: undefined });
expect(res2.status).toEqual(200);
expect(res2.headers['content-type']).toContain("application/json")
});
});