aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorjw2552018-04-13 16:10:32 +0100
committerjw2552018-04-13 16:10:32 +0100
commitdeab81f8ef469c4119838d72b56683b8dd4cbcfe (patch)
tree772727cde544fbaa86a1be0849b04a27c708d4d5 /test
parentdatebase retrieves all properties (diff)
downloadmedicine-deab81f8ef469c4119838d72b56683b8dd4cbcfe.tar.gz
medicine-deab81f8ef469c4119838d72b56683b8dd4cbcfe.zip

fixed some privs

Diffstat (limited to 'test')
-rw-r--r--test/integration/protocol.routes.test.ts16
-rw-r--r--test/test-db.ts1
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();