new get test

ref #17
This commit is contained in:
Nicolai Ort 2020-12-10 20:33:36 +01:00
parent d295100a48
commit 5a27689e80
1 changed files with 8 additions and 0 deletions

View File

@ -2,6 +2,14 @@ import axios from 'axios';
import { config } from '../../config';
const base = "http://localhost:" + config.internal_port
describe('GET /api/organisations', () => {
it('basic get should return 200', async () => {
const res = await axios.get(base + '/api/organisations');
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json")
});
});
// ---------------
describe('POST /api/organisations', () => {
it('creating a new org with just a name should return 200', async () => {
const res = await axios.post(base + '/api/organisations', {