From f8b8c36b2a92bfee435747ab5a0283924be76281 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 23 Jan 2018 09:15:36 +0100 Subject: Destroy user token when changing its role --- server/tests/utils/users/login.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/tests/utils') diff --git a/server/tests/utils/users/login.ts b/server/tests/utils/users/login.ts index 04444e2f1..338ae1c00 100644 --- a/server/tests/utils/users/login.ts +++ b/server/tests/utils/users/login.ts @@ -32,8 +32,8 @@ async function serverLogin (server: Server) { return res.body.access_token as string } -async function userLogin (server: Server, user: User) { - const res = await login(server.url, server.client, user, 200) +async function userLogin (server: Server, user: User, expectedStatus = 200) { + const res = await login(server.url, server.client, user, expectedStatus) return res.body.access_token as string } -- cgit v1.2.3