mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 05:33:08 +02:00
647a018362
* fix(backend): return HTTP 400 for any invalid api endpoint paths * 404
11 lines
296 B
JavaScript
11 lines
296 B
JavaScript
describe('API', () => {
|
|
it('returns HTTP 404 to unknown API endpoint paths', () => {
|
|
cy.request({
|
|
url: '/api/foo',
|
|
failOnStatusCode: false,
|
|
}).then((response) => {
|
|
expect(response.status).to.eq(404);
|
|
expect(response.body.error.code).to.eq('UNKNOWN_API_ENDPOINT');
|
|
});
|
|
});
|
|
});
|