From 41d1d075011174e73dccb74006181a92a618d7b4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 13 Jul 2021 11:05:15 +0200 Subject: Introduce login command --- server/tests/api/check-params/videos.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'server/tests/api/check-params/videos.ts') 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 { removeVideo, root, ServerInfo, - setAccessTokensToServers, - userLogin + setAccessTokensToServers } from '../../../../shared/extra-utils' import { checkBadCountPagination, @@ -55,7 +54,7 @@ describe('Test videos API validator', function () { const username = 'user1' const password = 'my super password' await createUser({ url: server.url, accessToken: server.accessToken, username: username, password: password }) - userAccessToken = await userLogin(server, { username, password }) + userAccessToken = await server.loginCommand.getAccessToken({ username, password }) { const res = await getMyUserInformation(server.url, server.accessToken) @@ -286,7 +285,7 @@ describe('Test videos API validator', function () { } await createUser({ url: server.url, accessToken: server.accessToken, username: user.username, password: user.password }) - const accessTokenUser = await userLogin(server, user) + const accessTokenUser = await server.loginCommand.getAccessToken(user) const res = await getMyUserInformation(server.url, accessTokenUser) const customChannelId = res.body.videoChannels[0].id -- cgit v1.2.3