aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/videos.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/videos.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/videos.ts')
-rw-r--r--server/tests/api/check-params/videos.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts
index 6549063b1..8e11232bd 100644
--- a/server/tests/api/check-params/videos.ts
+++ b/server/tests/api/check-params/videos.ts
@@ -22,8 +22,7 @@ import {
22 removeVideo, 22 removeVideo,
23 root, 23 root,
24 ServerInfo, 24 ServerInfo,
25 setAccessTokensToServers, 25 setAccessTokensToServers
26 userLogin
27} from '../../../../shared/extra-utils' 26} from '../../../../shared/extra-utils'
28import { 27import {
29 checkBadCountPagination, 28 checkBadCountPagination,
@@ -55,7 +54,7 @@ describe('Test videos API validator', function () {
55 const username = 'user1' 54 const username = 'user1'
56 const password = 'my super password' 55 const password = 'my super password'
57 await createUser({ url: server.url, accessToken: server.accessToken, username: username, password: password }) 56 await createUser({ url: server.url, accessToken: server.accessToken, username: username, password: password })
58 userAccessToken = await userLogin(server, { username, password }) 57 userAccessToken = await server.loginCommand.getAccessToken({ username, password })
59 58
60 { 59 {
61 const res = await getMyUserInformation(server.url, server.accessToken) 60 const res = await getMyUserInformation(server.url, server.accessToken)
@@ -286,7 +285,7 @@ describe('Test videos API validator', function () {
286 } 285 }
287 await createUser({ url: server.url, accessToken: server.accessToken, username: user.username, password: user.password }) 286 await createUser({ url: server.url, accessToken: server.accessToken, username: user.username, password: user.password })
288 287
289 const accessTokenUser = await userLogin(server, user) 288 const accessTokenUser = await server.loginCommand.getAccessToken(user)
290 const res = await getMyUserInformation(server.url, accessTokenUser) 289 const res = await getMyUserInformation(server.url, accessTokenUser)
291 const customChannelId = res.body.videoChannels[0].id 290 const customChannelId = res.body.videoChannels[0].id
292 291