Alpha Release 0.3.0 #122

Merged
niggl merged 42 commits from dev into main 2021-01-24 17:57:38 +00:00
Showing only changes of commit 0c87906cc3 - Show all commits

View File

@ -21,4 +21,23 @@ describe('GET /api/runners/me invalid should return fail', () => {
expect(res.headers['content-type']).toContain("application/json");
});
});
// ---------------
// ---------------
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");
});
});