Updated api doc tests to listen on the right endpoint

ref #4
This commit is contained in:
2021-03-03 16:21:11 +01:00
parent ec939e6c11
commit f6a53cc3e4
2 changed files with 12 additions and 11 deletions

View File

@@ -2,33 +2,33 @@ import axios from 'axios';
import { config } from '../config';
const base = "http://localhost:" + config.internal_port
describe('GET /api/docs/openapi.json', () => {
describe('GET /docs/openapi.json', () => {
it('OpenAPI Spec is availdable 200', async () => {
const res = await axios.get(base + '/api/docs/openapi.json');
const res = await axios.get(base + '/docs/openapi.json');
expect(res.status).toEqual(200);
});
});
describe('GET /api/docs/swagger.json', () => {
describe('GET /docs/swagger.json', () => {
it('OpenAPI Spec is availdable 200', async () => {
const res = await axios.get(base + '/api/docs/swagger.json');
const res = await axios.get(base + '/docs/swagger.json');
expect(res.status).toEqual(200);
});
});
describe('GET /api/docs/swaggerui', () => {
describe('GET /docs/swaggerui', () => {
it('swaggerui is availdable 200', async () => {
const res = await axios.get(base + '/api/docs/swaggerui');
const res = await axios.get(base + '/docs/swaggerui');
expect(res.status).toEqual(200);
});
});
describe('GET /api/docs/redoc', () => {
describe('GET /docs/redoc', () => {
it('redoc is availdable 200', async () => {
const res = await axios.get(base + '/api/docs/redoc');
const res = await axios.get(base + '/docs/redoc');
expect(res.status).toEqual(200);
});
});
describe('GET /api/docs/rapidoc', () => {
describe('GET /docs/rapidoc', () => {
it('rapidoc is availdable 200', async () => {
const res = await axios.get(base + '/api/docs/rapidoc');
const res = await axios.get(base + '/docs/rapidoc');
expect(res.status).toEqual(200);
});
});