diff options
| author | Tom Harley | 2018-04-22 22:30:54 +0100 |
|---|---|---|
| committer | Tom Harley | 2018-04-22 22:31:23 +0100 |
| commit | 1b2fe66acf4041728dcb772ee9638b6b79f34d1a (patch) | |
| tree | ecb03f6551e35336f5a654f3b3257435cbadfb6d /test/integration/protocol.routes.test.ts | |
| parent | Edit file uploads to use raw data instead of forms (diff) | |
| parent | fixxed tests (diff) | |
| download | medicine-1b2fe66acf4041728dcb772ee9638b6b79f34d1a.tar.gz medicine-1b2fe66acf4041728dcb772ee9638b6b79f34d1a.zip | |
Merge branch ‘trh/gets’ of gitlab.cs.st-andrews.ac.uk:cs3099group-be-4/project-code into trh/gets
Diffstat (limited to 'test/integration/protocol.routes.test.ts')
| -rw-r--r-- | test/integration/protocol.routes.test.ts | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/test/integration/protocol.routes.test.ts b/test/integration/protocol.routes.test.ts index a371fd5..d60f844 100644 --- a/test/integration/protocol.routes.test.ts +++ b/test/integration/protocol.routes.test.ts @@ -103,7 +103,8 @@ const completeProtocol: MochaForEachInput[] = [ 'warning', 'error', 'critical', - 'success' + 'success', + 'failure' ]), message: types.anything, label: optional(types.string), @@ -135,7 +136,7 @@ const completeProtocol: MochaForEachInput[] = [ ]) }), 200], ['post', '/properties?action=update', - [{id: 'new_prop', value: 'some_value'}], 200], + [{id: 'project_example', value: 2}], 200], ['get', '/user_privileges', array({ privilege: types.string, description: types.string, @@ -166,7 +167,8 @@ const completeProtocol: MochaForEachInput[] = [ public_admin_metadata: types.anything, private_admin_metadata: types.anything }, 200], - ['post', '/users/new_user', null, 200], + ['post', '/users/new_user?action=create', + {password: 'secret', privileges: []}, 200], ['get', '/users/mock_user/properties', { data: optional(types.anything) }, 200], @@ -182,7 +184,10 @@ const completeProtocol: MochaForEachInput[] = [ public_admin_metadata: types.anything, private_admin_metadata: types.anything }, 200], - ['post', '/current_user', null, 200], + ['post', '/current_user?action=update', {password: { + old: 'pass', + new: 'newpass' + }}, 200], ['get', '/project_roles', array({ role: types.string, description: types.string, @@ -208,11 +213,11 @@ const completeProtocol: MochaForEachInput[] = [ private_metadata: types.anything, admin_metadata: optional(types.anything) }, 200], - ['post', '/projects/mocky', null, 200], + ['post', '/projects/mocky2', {}, 200], ['get', '/projects/mocky/properties', null, 200], - ['post', '/projects/mocky/files/folder+some_file?action=overwrite', {}, 200], - ['get', '/projects/mocky/files/folder+some_file', null, 200], - ['get', '/projects/mocky/files_by_id/file1', null, 200] + ['post', '/projects/mocky/files/foler/file?action=overwrite', {}, 200], + ['get', '/projects/mocky/files/foler/file', null, 200] + //['get', '/projects/mocky/files_by_id/file1', null, 200] ]; /* tslint:enable:align */ |
