aboutsummaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorjw2552018-04-23 13:54:17 +0100
committerjw2552018-04-23 13:54:17 +0100
commitfac0433557ac9556d48a9bb2421ac96ff220786d (patch)
tree20ec191c4945f926d0bb21a5f29e792308bf543f /test/integration
parentremoved R_eport (diff)
downloadmedicine-fac0433557ac9556d48a9bb2421ac96ff220786d.tar.gz
medicine-fac0433557ac9556d48a9bb2421ac96ff220786d.zip

fixed various tests and errors

Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/auth.routes.test.ts4
-rw-r--r--test/integration/protocol.routes.test.ts9
2 files changed, 7 insertions, 6 deletions
diff --git a/test/integration/auth.routes.test.ts b/test/integration/auth.routes.test.ts
index 29c0cfc..c090984 100644
--- a/test/integration/auth.routes.test.ts
+++ b/test/integration/auth.routes.test.ts
@@ -80,10 +80,10 @@ describe('authentication', () => {
grant_type: 'password'
}).then((res) => {
// File-not-found is a valid response
- expect(res).to.have.status(404);
+ expect(res).to.have.status(401);
}).catch((reason) => {
// Unauthorised is a valid response
- expect(reason).to.have.status(401);
+ expect(reason).to.have.status(404);
});
});
it('should reject invalid usernames', () => {
diff --git a/test/integration/protocol.routes.test.ts b/test/integration/protocol.routes.test.ts
index 77b39f0..882d680 100644
--- a/test/integration/protocol.routes.test.ts
+++ b/test/integration/protocol.routes.test.ts
@@ -100,11 +100,12 @@ const completeProtocol: MochaForEachInput[] = [
'debug',
'info',
'security',
- 'warning',
+ 'warn',
'error',
'critical',
'success',
- 'failure'
+ 'failure',
+ 'verbose'
]),
message: types.anything,
label: optional(types.string),
@@ -215,8 +216,8 @@ const completeProtocol: MochaForEachInput[] = [
}, 200],
['post', '/projects/mocky2', {}, 200],
['get', '/projects/mocky/properties', null, 200],
- ['post', '/projects/mocky/files/foler/file?action=overwrite', {}, 200],
- ['get', '/projects/mocky/files/foler/file', null, 200]
+ ['post', '/projects/mocky/files/file?overwrite=true&truncate=true', {}, 200],
+ ['get', '/projects/mocky/files/file', null, 200]
//['get', '/projects/mocky/files_by_id/file1', null, 200]
];