Added test for getting an non-existant team
This commit is contained in:
parent
c3258b9304
commit
f4abbfcee4
@ -10,6 +10,14 @@ describe('GET /api/teams', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
// ---------------
|
// ---------------
|
||||||
|
describe('GET /api/teams/0', () => {
|
||||||
|
it('basic get should return 404', async () => {
|
||||||
|
const res = await axios.get(base + '/api/teams/0', { validateStatus: undefined });
|
||||||
|
expect(res.status).toEqual(404);
|
||||||
|
expect(res.headers['content-type']).toContain("application/json")
|
||||||
|
});
|
||||||
|
});
|
||||||
|
// ---------------
|
||||||
describe('POST /api/teams with errors', () => {
|
describe('POST /api/teams with errors', () => {
|
||||||
it('creating a new team without a name should return 400', async () => {
|
it('creating a new team without a name should return 400', async () => {
|
||||||
const res1 = await axios.post(base + '/api/teams', {
|
const res1 = await axios.post(base + '/api/teams', {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user