Changed organisation* to organization* in descriptions, comments and endoints ✏
ref #117
This commit is contained in:
@@ -69,7 +69,7 @@ describe('POST /api/cards successfully (with runner)', () => {
|
||||
let added_org;
|
||||
let added_runner;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
|
||||
@@ -50,7 +50,7 @@ describe('adding + updating card.runner successfully', () => {
|
||||
let added_runner2;
|
||||
let added_card;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
|
||||
@@ -108,7 +108,7 @@ describe('POST /api/contacts working (with group)', () => {
|
||||
let added_team;
|
||||
let added_contact;
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
delete res.data.contact;
|
||||
|
||||
@@ -50,7 +50,7 @@ describe('add+delete (with org)', () => {
|
||||
let added_org;
|
||||
let added_contact;
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
delete res.data.contact;
|
||||
@@ -88,7 +88,7 @@ describe('add+delete (with team)', () => {
|
||||
let added_team;
|
||||
let added_contact;
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
delete res.data.contact;
|
||||
@@ -137,7 +137,7 @@ describe('add+delete (with org&team)', () => {
|
||||
let added_team;
|
||||
let added_contact;
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
delete res.data.contact;
|
||||
|
||||
@@ -59,7 +59,7 @@ describe('Update contact group after adding (should work)', () => {
|
||||
let added_team;
|
||||
let added_contact;
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
delete res.data.contact;
|
||||
@@ -189,7 +189,7 @@ describe('Update contact group invalid after adding (should fail)', () => {
|
||||
let added_org;
|
||||
let added_contact;
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
delete res.data.contact;
|
||||
|
||||
@@ -83,7 +83,7 @@ describe('POST /api/donations/distance illegally', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
@@ -199,7 +199,7 @@ describe('POST /api/donations/distance successfully', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
|
||||
@@ -70,7 +70,7 @@ describe('DELETE distance donation', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
|
||||
@@ -73,7 +73,7 @@ describe('adding + getting distance donation', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
|
||||
@@ -84,7 +84,7 @@ describe('adding + updating distance donation illegally', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
@@ -253,7 +253,7 @@ describe('adding + updating distance donation valid', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
|
||||
@@ -60,7 +60,7 @@ describe('DELETE donor with donations invalid', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
@@ -115,7 +115,7 @@ describe('DELETE donor with donations valid', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
|
||||
@@ -14,24 +14,24 @@ beforeAll(async () => {
|
||||
};
|
||||
});
|
||||
|
||||
describe('GET /api/organisations', () => {
|
||||
describe('GET /api/organizations', () => {
|
||||
it('basic get should return 200', async () => {
|
||||
const res = await axios.get(base + '/api/organisations', axios_config);
|
||||
const res = await axios.get(base + '/api/organizations', axios_config);
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
});
|
||||
// ---------------
|
||||
describe('POST /api/organisations', () => {
|
||||
describe('POST /api/organizations', () => {
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('creating a new org with without a name should return 400', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": null
|
||||
}, axios_config);
|
||||
expect(res.status).toEqual(400);
|
||||
@@ -41,14 +41,14 @@ describe('POST /api/organisations', () => {
|
||||
// ---------------
|
||||
describe('adding + getting from all orgs', () => {
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('check if org was added', async () => {
|
||||
const res = await axios.get(base + '/api/organisations', axios_config);
|
||||
const res = await axios.get(base + '/api/organizations', axios_config);
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
let added_org = res.data[res.data.length - 1]
|
||||
@@ -72,7 +72,7 @@ describe('adding + getting from all orgs', () => {
|
||||
describe('adding + getting explicitly', () => {
|
||||
let added_org_id
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
let added_org = res1.data
|
||||
@@ -81,7 +81,7 @@ describe('adding + getting explicitly', () => {
|
||||
expect(res1.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('check if org was added', async () => {
|
||||
const res2 = await axios.get(base + '/api/organisations/' + added_org_id, axios_config);
|
||||
const res2 = await axios.get(base + '/api/organizations/' + added_org_id, axios_config);
|
||||
expect(res2.status).toEqual(200);
|
||||
expect(res2.headers['content-type']).toContain("application/json")
|
||||
let added_org2 = res2.data
|
||||
|
||||
@@ -17,7 +17,7 @@ beforeAll(async () => {
|
||||
// ---------------
|
||||
describe('adding + deletion (non-existant)', () => {
|
||||
it('delete', async () => {
|
||||
const res2 = await axios.delete(base + '/api/organisations/0', axios_config);
|
||||
const res2 = await axios.delete(base + '/api/organizations/0', axios_config);
|
||||
expect(res2.status).toEqual(204);
|
||||
});
|
||||
});
|
||||
@@ -26,7 +26,7 @@ describe('adding + deletion (successfull)', () => {
|
||||
let added_org_id
|
||||
let added_org
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
@@ -35,7 +35,7 @@ describe('adding + deletion (successfull)', () => {
|
||||
expect(res1.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('delete', async () => {
|
||||
const res2 = await axios.delete(base + '/api/organisations/' + added_org_id, axios_config);
|
||||
const res2 = await axios.delete(base + '/api/organizations/' + added_org_id, axios_config);
|
||||
expect(res2.status).toEqual(200);
|
||||
expect(res2.headers['content-type']).toContain("application/json")
|
||||
let added_org2 = res2.data
|
||||
@@ -56,7 +56,7 @@ describe('adding + deletion (successfull)', () => {
|
||||
});
|
||||
});
|
||||
it('check if org really was deleted', async () => {
|
||||
const res3 = await axios.get(base + '/api/organisations/' + added_org_id, axios_config);
|
||||
const res3 = await axios.get(base + '/api/organizations/' + added_org_id, axios_config);
|
||||
expect(res3.status).toEqual(404);
|
||||
expect(res3.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
@@ -68,7 +68,7 @@ describe('adding + deletion with teams still existing (without force)', () => {
|
||||
let added_team;
|
||||
let added_team_id
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data;
|
||||
@@ -87,7 +87,7 @@ describe('adding + deletion with teams still existing (without force)', () => {
|
||||
expect(res2.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('delete org - this should fail with a 406', async () => {
|
||||
const res2 = await axios.delete(base + '/api/organisations/' + added_org_id, axios_config);
|
||||
const res2 = await axios.delete(base + '/api/organizations/' + added_org_id, axios_config);
|
||||
expect(res2.status).toEqual(406);
|
||||
expect(res2.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
@@ -99,7 +99,7 @@ describe('adding + deletion with teams still existing (with force)', () => {
|
||||
let added_team;
|
||||
let added_team_id
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data;
|
||||
@@ -118,7 +118,7 @@ describe('adding + deletion with teams still existing (with force)', () => {
|
||||
expect(res2.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('delete', async () => {
|
||||
const res2 = await axios.delete(base + '/api/organisations/' + added_org_id + '?force=true', axios_config);
|
||||
const res2 = await axios.delete(base + '/api/organizations/' + added_org_id + '?force=true', axios_config);
|
||||
expect(res2.status).toEqual(200);
|
||||
expect(res2.headers['content-type']).toContain("application/json")
|
||||
let added_org2 = res2.data
|
||||
@@ -139,7 +139,7 @@ describe('adding + deletion with teams still existing (with force)', () => {
|
||||
});
|
||||
});
|
||||
it('check if org really was deleted', async () => {
|
||||
const res3 = await axios.get(base + '/api/organisations/' + added_org_id, axios_config);
|
||||
const res3 = await axios.get(base + '/api/organizations/' + added_org_id, axios_config);
|
||||
expect(res3.status).toEqual(404);
|
||||
expect(res3.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
|
||||
@@ -14,15 +14,15 @@ beforeAll(async () => {
|
||||
};
|
||||
});
|
||||
|
||||
describe('GET /api/organisations', () => {
|
||||
describe('GET /api/organizations', () => {
|
||||
it('basic get should return 200', async () => {
|
||||
const res = await axios.get(base + '/api/organisations', axios_config);
|
||||
const res = await axios.get(base + '/api/organizations', axios_config);
|
||||
expect(res.status).toEqual(200);
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
});
|
||||
// ---------------
|
||||
describe('GET /api/organisations/0', () => {
|
||||
describe('GET /api/organizations/0', () => {
|
||||
it('basic get should return 404', async () => {
|
||||
const res = await axios.get(base + '/api/runners/0', axios_config);
|
||||
expect(res.status).toEqual(404);
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('adding + updating name', () => {
|
||||
let added_org_id
|
||||
let added_org
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
@@ -28,7 +28,7 @@ describe('adding + updating name', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('update org', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
@@ -59,7 +59,7 @@ describe('adding + try updating id (should return 406)', () => {
|
||||
let added_org_id
|
||||
let added_org
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
@@ -68,7 +68,7 @@ describe('adding + try updating id (should return 406)', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('update org', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id + 1,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
@@ -83,7 +83,7 @@ describe('adding + updateing address valid)', () => {
|
||||
let added_org_id
|
||||
let added_org
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
@@ -92,7 +92,7 @@ describe('adding + updateing address valid)', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('adding address to org should return 200', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
@@ -122,7 +122,7 @@ describe('adding + updateing address valid)', () => {
|
||||
});
|
||||
});
|
||||
it('updateing address\'s first line should return 200', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
@@ -152,7 +152,7 @@ describe('adding + updateing address valid)', () => {
|
||||
});
|
||||
});
|
||||
it('updateing address\'s second line should return 200', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
@@ -182,7 +182,7 @@ describe('adding + updateing address valid)', () => {
|
||||
});
|
||||
});
|
||||
it('updateing address\'s city should return 200', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
@@ -212,7 +212,7 @@ describe('adding + updateing address valid)', () => {
|
||||
});
|
||||
});
|
||||
it('updateing address\'s country should return 200', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
@@ -242,7 +242,7 @@ describe('adding + updateing address valid)', () => {
|
||||
});
|
||||
});
|
||||
it('updateing address\'s postal code should return 200', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
@@ -272,7 +272,7 @@ describe('adding + updateing address valid)', () => {
|
||||
});
|
||||
});
|
||||
it('removing org\'s address should return 200', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
@@ -300,7 +300,7 @@ describe('adding + updateing address invalid)', () => {
|
||||
let added_org_id
|
||||
let added_org
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
@@ -309,7 +309,7 @@ describe('adding + updateing address invalid)', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('adding address to org w/o address1 should return 400', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
@@ -325,7 +325,7 @@ describe('adding + updateing address invalid)', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json");
|
||||
});
|
||||
it('adding address to org w/o city should return 400', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
@@ -341,7 +341,7 @@ describe('adding + updateing address invalid)', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json");
|
||||
});
|
||||
it('adding address to org w/o country should return 400', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
@@ -357,7 +357,7 @@ describe('adding + updateing address invalid)', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json");
|
||||
});
|
||||
it('adding address to org w/o postal code should return 400', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
@@ -373,7 +373,7 @@ describe('adding + updateing address invalid)', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json");
|
||||
});
|
||||
it('adding address to org w/ invalid postal code should return 400', async () => {
|
||||
const res = await axios.put(base + '/api/organisations/' + added_org_id, {
|
||||
const res = await axios.put(base + '/api/organizations/' + added_org_id, {
|
||||
"id": added_org_id,
|
||||
"name": "testlelele",
|
||||
"contact": null,
|
||||
|
||||
@@ -58,7 +58,7 @@ describe('POST /api/teams with errors', () => {
|
||||
describe('POST /api/teams working', () => {
|
||||
let added_org_id;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
let added_org = res1.data
|
||||
|
||||
@@ -21,7 +21,7 @@ describe('adding org', () => {
|
||||
let added_team;
|
||||
let added_team_id
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data;
|
||||
|
||||
@@ -20,7 +20,7 @@ describe('adding + updating name', () => {
|
||||
let added_team;
|
||||
let added_team_id
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data;
|
||||
@@ -59,7 +59,7 @@ describe('adding + try updating id (should return 406)', () => {
|
||||
let added_team;
|
||||
let added_team_id
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data;
|
||||
@@ -92,7 +92,7 @@ describe('add+update parent org (valid)', () => {
|
||||
let added_team;
|
||||
let added_team_id
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data;
|
||||
@@ -110,7 +110,7 @@ describe('add+update parent org (valid)', () => {
|
||||
expect(res2.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res3 = await axios.post(base + '/api/organisations', {
|
||||
const res3 = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org2 = res3.data;
|
||||
|
||||
@@ -80,7 +80,7 @@ describe('POST /api/runners with errors', () => {
|
||||
describe('POST /api/runners working', () => {
|
||||
let added_org_id;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
let added_org = res1.data
|
||||
|
||||
@@ -25,7 +25,7 @@ describe('add+delete', () => {
|
||||
let added_org_id;
|
||||
let added_runner;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
let added_org = res1.data
|
||||
@@ -71,7 +71,7 @@ describe('DELETE donor with donations invalid', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
@@ -118,7 +118,7 @@ describe('DELETE donor with donations valid', () => {
|
||||
expect(res.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res.data
|
||||
|
||||
@@ -33,7 +33,7 @@ describe('GET /api/runners after adding', () => {
|
||||
let added_org_id;
|
||||
let added_runner;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
let added_org = res1.data
|
||||
|
||||
@@ -18,7 +18,7 @@ describe('Update runner name after adding', () => {
|
||||
let added_org;
|
||||
let added_runner;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
delete res1.data.registrationEnabled;
|
||||
@@ -58,7 +58,7 @@ describe('Update runner group after adding', () => {
|
||||
let added_org_2;
|
||||
let added_runner;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
let added_org = res1.data
|
||||
@@ -77,7 +77,7 @@ describe('Update runner group after adding', () => {
|
||||
expect(res2.headers['content-type']).toContain("application/json")
|
||||
});
|
||||
it('creating a new org with just a name should return 200', async () => {
|
||||
const res3 = await axios.post(base + '/api/organisations', {
|
||||
const res3 = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org_2 = res3.data
|
||||
@@ -103,7 +103,7 @@ describe('Update runner id after adding(should fail)', () => {
|
||||
let added_runner;
|
||||
let added_runner_id;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
let added_org = res1.data
|
||||
@@ -135,7 +135,7 @@ describe('Update runner group with invalid group after adding', () => {
|
||||
let added_org;
|
||||
let added_runner;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('POST /api/scans illegally', () => {
|
||||
let added_org;
|
||||
let added_runner;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
@@ -70,7 +70,7 @@ describe('POST /api/scans successfully', () => {
|
||||
let added_org;
|
||||
let added_runner;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
@@ -144,7 +144,7 @@ describe('POST /api/scans successfully via scan station', () => {
|
||||
let added_track;
|
||||
let added_station;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
|
||||
@@ -21,7 +21,7 @@ describe('DELETE scan', () => {
|
||||
let added_runner;
|
||||
let added_scan;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
|
||||
@@ -35,7 +35,7 @@ describe('adding + getting scans', () => {
|
||||
let added_runner;
|
||||
let added_scan;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
|
||||
@@ -19,7 +19,7 @@ describe('adding + updating illegally', () => {
|
||||
let added_runner;
|
||||
let added_scan;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
@@ -86,7 +86,7 @@ describe('adding + updating successfilly', () => {
|
||||
let added_runner2;
|
||||
let added_scan;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
|
||||
@@ -98,7 +98,7 @@ describe('register citizen valid', () => {
|
||||
describe('register invalid company', () => {
|
||||
let added_org;
|
||||
it('creating a new org with just a name and registration enabled should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123",
|
||||
"registrationEnabled": true
|
||||
}, axios_config);
|
||||
@@ -156,7 +156,7 @@ describe('register valid company', () => {
|
||||
let added_org;
|
||||
let added_team;
|
||||
it('creating a new org with just a name and registration enabled should return 200', async () => {
|
||||
const res = await axios.post(base + '/api/organisations', {
|
||||
const res = await axios.post(base + '/api/organizations', {
|
||||
"name": "test123",
|
||||
"registrationEnabled": true
|
||||
}, axios_config);
|
||||
|
||||
@@ -22,7 +22,7 @@ describe('POST /api/scans illegally', () => {
|
||||
let added_track;
|
||||
let added_station;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
@@ -109,7 +109,7 @@ describe('POST /api/scans successfully', () => {
|
||||
let added_track;
|
||||
let added_station;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
@@ -179,7 +179,7 @@ describe('POST /api/scans successfully via scan station', () => {
|
||||
let added_track;
|
||||
let added_station;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
|
||||
@@ -24,7 +24,7 @@ describe('DELETE scan', () => {
|
||||
let added_station;
|
||||
let added_scan;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
|
||||
@@ -38,7 +38,7 @@ describe('adding + getting scans', () => {
|
||||
let added_station;
|
||||
let added_scan;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
|
||||
@@ -22,7 +22,7 @@ describe('adding + updating illegally', () => {
|
||||
let added_station;
|
||||
let added_scan;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
@@ -123,7 +123,7 @@ describe('adding + updating successfilly', () => {
|
||||
let added_station2;
|
||||
let added_scan;
|
||||
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/organizations', {
|
||||
"name": "test123"
|
||||
}, axios_config);
|
||||
added_org = res1.data
|
||||
|
||||
Reference in New Issue
Block a user