diff options
author | Chocobozzz <me@florianbigard.com> | 2018-01-23 09:15:36 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-01-23 09:49:57 +0100 |
commit | f8b8c36b2a92bfee435747ab5a0283924be76281 (patch) | |
tree | 99e17a5c9413614071ae63d72e9b9557fc8cef43 /server/tests/utils/users/login.ts | |
parent | 59c48d49c5f06a46c342b4e7f86fbd1ed9894bd6 (diff) | |
download | PeerTube-f8b8c36b2a92bfee435747ab5a0283924be76281.tar.gz PeerTube-f8b8c36b2a92bfee435747ab5a0283924be76281.tar.zst PeerTube-f8b8c36b2a92bfee435747ab5a0283924be76281.zip |
Destroy user token when changing its role
Diffstat (limited to 'server/tests/utils/users/login.ts')
-rw-r--r-- | server/tests/utils/users/login.ts | 4 |
1 files changed, 2 insertions, 2 deletions
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) { | |||
32 | return res.body.access_token as string | 32 | return res.body.access_token as string |
33 | } | 33 | } |
34 | 34 | ||
35 | async function userLogin (server: Server, user: User) { | 35 | async function userLogin (server: Server, user: User, expectedStatus = 200) { |
36 | const res = await login(server.url, server.client, user, 200) | 36 | const res = await login(server.url, server.client, user, expectedStatus) |
37 | 37 | ||
38 | return res.body.access_token as string | 38 | return res.body.access_token as string |
39 | } | 39 | } |