Added basic runner get tests

ref #17
This commit is contained in:
Nicolai Ort 2020-12-10 16:18:23 +01:00
parent e2feffa1c5
commit d0d050e6c6
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import axios from 'axios';
import { config } from '../../config';
const base = "http://localhost:" + config.internal_port
describe('GET /api/runners', () => {
it('basic get should return 200', async () => {
const res = await axios.get(base + '/api/runners');
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json")
});
});
// ---------------
describe('GET /api/runners/0', () => {
it('basic get should return 404', async () => {
const res = await axios.get(base + '/api/runners/0', { validateStatus: undefined });
expect(res.status).toEqual(404);
expect(res.headers['content-type']).toContain("application/json")
});
});