diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-13 11:05:15 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 41d1d075011174e73dccb74006181a92a618d7b4 (patch) | |
tree | 4dc1af0e266977f062cf9716837d04de1cdd628d /server/tests/api/check-params/videos.ts | |
parent | 6c5065a011b099618681a37bd77eaa7bd3db752e (diff) | |
download | PeerTube-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.ts | 7 |
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' |
28 | import { | 27 | import { |
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 | ||