aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/live.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-13 11:05:15 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit41d1d075011174e73dccb74006181a92a618d7b4 (patch)
tree4dc1af0e266977f062cf9716837d04de1cdd628d /server/tests/api/check-params/live.ts
parent6c5065a011b099618681a37bd77eaa7bd3db752e (diff)
downloadPeerTube-41d1d075011174e73dccb74006181a92a618d7b4.tar.gz
PeerTube-41d1d075011174e73dccb74006181a92a618d7b4.tar.zst
PeerTube-41d1d075011174e73dccb74006181a92a618d7b4.zip
Introduce login command
Diffstat (limited to 'server/tests/api/check-params/live.ts')
-rw-r--r--server/tests/api/check-params/live.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/tests/api/check-params/live.ts b/server/tests/api/check-params/live.ts
index 394967285..045f3a1b1 100644
--- a/server/tests/api/check-params/live.ts
+++ b/server/tests/api/check-params/live.ts
@@ -17,8 +17,7 @@ import {
17 ServerInfo, 17 ServerInfo,
18 setAccessTokensToServers, 18 setAccessTokensToServers,
19 stopFfmpeg, 19 stopFfmpeg,
20 uploadVideoAndGetId, 20 uploadVideoAndGetId
21 userLogin
22} from '../../../../shared/extra-utils' 21} from '../../../../shared/extra-utils'
23 22
24describe('Test video lives API validator', function () { 23describe('Test video lives API validator', function () {
@@ -53,7 +52,7 @@ describe('Test video lives API validator', function () {
53 const username = 'user1' 52 const username = 'user1'
54 const password = 'my super password' 53 const password = 'my super password'
55 await createUser({ url: server.url, accessToken: server.accessToken, username: username, password: password }) 54 await createUser({ url: server.url, accessToken: server.accessToken, username: username, password: password })
56 userAccessToken = await userLogin(server, { username, password }) 55 userAccessToken = await server.loginCommand.getAccessToken({ username, password })
57 56
58 { 57 {
59 const res = await getMyUserInformation(server.url, server.accessToken) 58 const res = await getMyUserInformation(server.url, server.accessToken)
@@ -150,7 +149,7 @@ describe('Test video lives API validator', function () {
150 } 149 }
151 await createUser({ url: server.url, accessToken: server.accessToken, username: user.username, password: user.password }) 150 await createUser({ url: server.url, accessToken: server.accessToken, username: user.username, password: user.password })
152 151
153 const accessTokenUser = await userLogin(server, user) 152 const accessTokenUser = await server.loginCommand.getAccessToken(user)
154 const res = await getMyUserInformation(server.url, accessTokenUser) 153 const res = await getMyUserInformation(server.url, accessTokenUser)
155 const customChannelId = res.body.videoChannels[0].id 154 const customChannelId = res.body.videoChannels[0].id
156 155