diff options
| author | jw255 | 2018-04-23 14:21:18 +0100 |
|---|---|---|
| committer | jw255 | 2018-04-23 14:21:18 +0100 |
| commit | be7323607e2e68b778dd11e426795a63c1cb5cf5 (patch) | |
| tree | fe87f382ada112e40697f3924f763a62e98bdc63 /test/integration | |
| parent | josh ind.rep (diff) | |
| download | medicine-be7323607e2e68b778dd11e426795a63c1cb5cf5.tar.gz medicine-be7323607e2e68b778dd11e426795a63c1cb5cf5.zip | |
ALL TESTS FIXXXXXXXED
Diffstat (limited to 'test/integration')
| -rw-r--r-- | test/integration/protocol.routes.test.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/integration/protocol.routes.test.ts b/test/integration/protocol.routes.test.ts index 882d680..d289de3 100644 --- a/test/integration/protocol.routes.test.ts +++ b/test/integration/protocol.routes.test.ts @@ -217,7 +217,7 @@ const completeProtocol: MochaForEachInput[] = [ ['post', '/projects/mocky2', {}, 200], ['get', '/projects/mocky/properties', null, 200], ['post', '/projects/mocky/files/file?overwrite=true&truncate=true', {}, 200], - ['get', '/projects/mocky/files/file', null, 200] + ['get', '/projects/mocky/files/file', null, 404] //['get', '/projects/mocky/files_by_id/file1', null, 200] ]; @@ -309,9 +309,12 @@ describe('routes : protocol', () => { describe('GET invalid routes', () => { // Should invalid routes also possibly be 401? - it.skip('should have response code 404', () => { + it('should have response code 404', () => { return chai.request(app).get('/invalid/route') .set('Authorization', `Bearer ${token}`) + .then((res: ChaiHttp.Response) => { + expect(res.status).to.equal(404); + }) .catch((err) => { expect(err.status).to.equal(404); }); @@ -327,9 +330,12 @@ describe('routes : protocol', () => { describe('POST invalid routes', () => { // Should invalid routes also possibly be 401? - it.skip('should have response code 404', () => { + it('should have response code 404', () => { return chai.request(app).post('/invalid/route') .set('Authorization', `Bearer ${token}`) + .then((res: ChaiHttp.Response) => { + expect(res.status).to.equal(404); + }) .catch((err) => { expect(err.status).to.equal(404); }); |
