From c050e9e45ed64cfde0bb90f00cd4a4b13374a95f Mon Sep 17 00:00:00 2001 From: jw255 Date: Sun, 22 Apr 2018 17:38:11 +0100 Subject: fixing tests --- test/integration/protocol.routes.test.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'test/integration/protocol.routes.test.ts') diff --git a/test/integration/protocol.routes.test.ts b/test/integration/protocol.routes.test.ts index a371fd5..4071322 100644 --- a/test/integration/protocol.routes.test.ts +++ b/test/integration/protocol.routes.test.ts @@ -135,7 +135,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 +166,7 @@ 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', null, 200], ['get', '/users/mock_user/properties', { data: optional(types.anything) }, 200], @@ -182,7 +182,10 @@ const completeProtocol: MochaForEachInput[] = [ public_admin_metadata: types.anything, private_admin_metadata: types.anything }, 200], - ['post', '/current_user', null, 200], + ['post', '/current_user', {password: { + old: "pass", + new: "pass" + }}, 200], ['get', '/project_roles', array({ role: types.string, description: types.string, @@ -208,7 +211,7 @@ 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], -- cgit v1.2.1 From de3deb507bcbcb5ee2a6c323058b9b3e877614f9 Mon Sep 17 00:00:00 2001 From: jw255 Date: Sun, 22 Apr 2018 17:57:35 +0100 Subject: fixxed tests --- test/integration/protocol.routes.test.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'test/integration/protocol.routes.test.ts') diff --git a/test/integration/protocol.routes.test.ts b/test/integration/protocol.routes.test.ts index 4071322..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), @@ -166,7 +167,8 @@ const completeProtocol: MochaForEachInput[] = [ public_admin_metadata: types.anything, private_admin_metadata: types.anything }, 200], - ['post', '/users/new_user?action=create', null, 200], + ['post', '/users/new_user?action=create', + {password: 'secret', privileges: []}, 200], ['get', '/users/mock_user/properties', { data: optional(types.anything) }, 200], @@ -182,9 +184,9 @@ const completeProtocol: MochaForEachInput[] = [ public_admin_metadata: types.anything, private_admin_metadata: types.anything }, 200], - ['post', '/current_user', {password: { - old: "pass", - new: "pass" + ['post', '/current_user?action=update', {password: { + old: 'pass', + new: 'newpass' }}, 200], ['get', '/project_roles', array({ role: types.string, @@ -213,9 +215,9 @@ const completeProtocol: MochaForEachInput[] = [ }, 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 */ -- cgit v1.2.1