Merge alpha 0.0.5 to master #54

Merged
niggl merged 292 commits from dev into main 2020-12-23 17:05:35 +00:00
Showing only changes of commit a671bf8bcb - Show all commits

View File

@ -33,6 +33,17 @@ describe('POST /api/tracks', () => {
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json")
});
});
// ---------------
describe('adding + getting tracks', () => {
it('correct distance input should return 200', async () => {
const res = await axios.post('http://localhost:4010/api/tracks', {
"name": "string",
"distance": 1000
});
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json")
});
it('check if track was added', async () => {
const res = await axios.get('http://localhost:4010/api/tracks');
expect(res.status).toEqual(200);
@ -41,7 +52,7 @@ describe('POST /api/tracks', () => {
delete added_track.id
expect(added_track).toEqual({
"name": "string",
"distance": 400
"distance": 1000
})
});
});