diff options
| author | jw255 | 2018-04-13 16:10:32 +0100 |
|---|---|---|
| committer | jw255 | 2018-04-13 16:10:32 +0100 |
| commit | deab81f8ef469c4119838d72b56683b8dd4cbcfe (patch) | |
| tree | 772727cde544fbaa86a1be0849b04a27c708d4d5 /test | |
| parent | datebase retrieves all properties (diff) | |
| download | medicine-deab81f8ef469c4119838d72b56683b8dd4cbcfe.tar.gz medicine-deab81f8ef469c4119838d72b56683b8dd4cbcfe.zip | |
fixed some privs
Diffstat (limited to 'test')
| -rw-r--r-- | test/integration/protocol.routes.test.ts | 16 | ||||
| -rw-r--r-- | test/test-db.ts | 1 |
2 files changed, 16 insertions, 1 deletions
diff --git a/test/integration/protocol.routes.test.ts b/test/integration/protocol.routes.test.ts index 6a08278..3eaafe5 100644 --- a/test/integration/protocol.routes.test.ts +++ b/test/integration/protocol.routes.test.ts @@ -239,8 +239,22 @@ describe('routes : protocol', () => { beforeEach(populateDatabase); beforeEach(getToken); + it.only('test log', () => { + return chai.request(app).get(base + '/log') + .set('Authorization', `Bearer ${token}`) + .catch((err) => { + console.log("a") + console.log(err.response.body) + expect(false); + }).then((res: ChaiHttp.Response) => { + console.log("b") + console.log(res.body) + expect(false); + }); + }); + describe('Access all valid routes', () => { - forEach(completeProtocol).it.only( + forEach(completeProtocol).it( '%s %s should be json', (method: string, path: string, temp: Template, resCode: number) => { const request: ChaiHttp.Request = method === 'get' diff --git a/test/test-db.ts b/test/test-db.ts index fa62ad7..be5782a 100644 --- a/test/test-db.ts +++ b/test/test-db.ts @@ -55,6 +55,7 @@ export const addUser: (database?: Database, admin?: boolean) => canCreateProjects: true, canDeleteProjects: true, canEditProjects: true, + canAccessLogs: true, isInternal: false }); await priv.save(); |
