aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/utils/users/login.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-23 09:15:36 +0100
committerChocobozzz <me@florianbigard.com>2018-01-23 09:49:57 +0100
commitf8b8c36b2a92bfee435747ab5a0283924be76281 (patch)
tree99e17a5c9413614071ae63d72e9b9557fc8cef43 /server/tests/utils/users/login.ts
parent59c48d49c5f06a46c342b4e7f86fbd1ed9894bd6 (diff)
downloadPeerTube-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.ts4
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
35async function userLogin (server: Server, user: User) { 35async 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}