feature/17-automated_tests #21

Merged
niggl merged 56 commits from feature/17-automated_tests into dev 2020-12-10 19:36:08 +00:00
Showing only changes of commit b4b52717fc - Show all commits

View File

@ -11,20 +11,28 @@ describe('GET /api/teams', () => {
});
// ---------------
describe('POST /api/teams with errors', () => {
it('creating a new org with without a team should return 400', async () => {
it('creating a new team without a name should return 400', async () => {
const res1 = await axios.post(base + '/api/teams', {
"name": "test_team"
"name": null
}, { validateStatus: undefined });
expect(res1.status).toEqual(400);
expect(res1.headers['content-type']).toContain("application/json")
});
it('creating a new org with without a name should return 400', async () => {
it('creating a new team without a org should return 400', async () => {
const res2 = await axios.post(base + '/api/teams', {
"name": null
"name": "test_team"
}, { validateStatus: undefined });
expect(res2.status).toEqual(400);
expect(res2.headers['content-type']).toContain("application/json")
});
it('creating a new team without a valid org should return 404', async () => {
const res3 = await axios.post(base + '/api/teams', {
"name": "test_team",
"parentGroup": -1
}, { validateStatus: undefined });
expect(res3.status).toEqual(404);
expect(res3.headers['content-type']).toContain("application/json")
});
});
// ---------------
describe('POST /api/teams working', () => {