parent
71e5be2ba4
commit
6e316a7533
@ -6,7 +6,6 @@ const base = "http://localhost:" + config.internal_port
|
|||||||
describe('adding + deletion (successfull)', () => {
|
describe('adding + deletion (successfull)', () => {
|
||||||
let added_org_id
|
let added_org_id
|
||||||
let added_org
|
let added_org
|
||||||
describe('adding org', () => {
|
|
||||||
it('creating a new org with just a name should return 200', async () => {
|
it('creating a new org with just a name should return 200', async () => {
|
||||||
const res1 = await axios.post(base + '/api/organisations', {
|
const res1 = await axios.post(base + '/api/organisations', {
|
||||||
"name": "test123"
|
"name": "test123"
|
||||||
@ -36,12 +35,10 @@ describe('adding + deletion (successfull)', () => {
|
|||||||
expect(res3.headers['content-type']).toContain("application/json")
|
expect(res3.headers['content-type']).toContain("application/json")
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
// ---------------
|
// ---------------
|
||||||
describe('adding + deletion (non-existant)', () => {
|
describe('adding + deletion (non-existant)', () => {
|
||||||
it('delete', async () => {
|
it('delete', async () => {
|
||||||
const res2 = await axios.delete(base + '/api/organisations/0', { validateStatus: undefined });
|
const res2 = await axios.delete(base + '/api/organisations/0', { validateStatus: undefined });
|
||||||
expect(res2.status).toEqual(204);
|
expect(res2.status).toEqual(204);
|
||||||
expect(res2.headers['content-type']).toContain("application/json")
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -52,7 +52,6 @@ describe('adding + getting from all orgs', () => {
|
|||||||
// ---------------
|
// ---------------
|
||||||
describe('adding + getting explicitly', () => {
|
describe('adding + getting explicitly', () => {
|
||||||
let added_org_id
|
let added_org_id
|
||||||
describe('adding + getting orgs', () => {
|
|
||||||
it('creating a new org with just a name should return 200', async () => {
|
it('creating a new org with just a name should return 200', async () => {
|
||||||
const res1 = await axios.post(base + '/api/organisations', {
|
const res1 = await axios.post(base + '/api/organisations', {
|
||||||
"name": "test123"
|
"name": "test123"
|
||||||
@ -77,4 +76,3 @@ describe('adding + getting explicitly', () => {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
@ -6,7 +6,6 @@ const base = "http://localhost:" + config.internal_port
|
|||||||
describe('adding + updating name', () => {
|
describe('adding + updating name', () => {
|
||||||
let added_org_id
|
let added_org_id
|
||||||
let added_org
|
let added_org
|
||||||
describe('adding org', () => {
|
|
||||||
it('creating a new org with just a name should return 200', async () => {
|
it('creating a new org with just a name should return 200', async () => {
|
||||||
const res1 = await axios.post(base + '/api/organisations', {
|
const res1 = await axios.post(base + '/api/organisations', {
|
||||||
"name": "test123"
|
"name": "test123"
|
||||||
@ -36,12 +35,10 @@ describe('adding + updating name', () => {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
// ---------------
|
// ---------------
|
||||||
describe('adding + try updating id (should return 406)', () => {
|
describe('adding + try updating id (should return 406)', () => {
|
||||||
let added_org_id
|
let added_org_id
|
||||||
let added_org
|
let added_org
|
||||||
describe('adding org', () => {
|
|
||||||
it('creating a new org with just a name should return 200', async () => {
|
it('creating a new org with just a name should return 200', async () => {
|
||||||
const res1 = await axios.post(base + '/api/organisations', {
|
const res1 = await axios.post(base + '/api/organisations', {
|
||||||
"name": "test123"
|
"name": "test123"
|
||||||
@ -62,4 +59,3 @@ describe('adding + try updating id (should return 406)', () => {
|
|||||||
expect(res2.headers['content-type']).toContain("application/json")
|
expect(res2.headers['content-type']).toContain("application/json")
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
Loading…
x
Reference in New Issue
Block a user