parent
1227408407
commit
0c87906cc3
@ -22,3 +22,22 @@ describe('GET /api/runners/me invalid should return fail', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
// ---------------
|
// ---------------
|
||||||
|
describe('register + get should return 200', () => {
|
||||||
|
let added_runner;
|
||||||
|
it('registering as citizen should return 200', async () => {
|
||||||
|
const res = await axios.post(base + '/api/runners/register', {
|
||||||
|
"firstname": "string",
|
||||||
|
"middlename": "string",
|
||||||
|
"lastname": "string",
|
||||||
|
"email": "user@example.com"
|
||||||
|
}, axios_config);
|
||||||
|
expect(res.status).toEqual(200);
|
||||||
|
expect(res.headers['content-type']).toContain("application/json");
|
||||||
|
added_runner = res.data;
|
||||||
|
});
|
||||||
|
it('get with valid jwt should return 200', async () => {
|
||||||
|
const res = await axios.get(base + '/api/runners/me/' + added_runner.token, axios_config);
|
||||||
|
expect(res.status).toEqual(200);
|
||||||
|
expect(res.headers['content-type']).toContain("application/json");
|
||||||
|
});
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user