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/moderation/blocklist.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'server/tests/api/moderation/blocklist.ts') diff --git a/server/tests/api/moderation/blocklist.ts b/server/tests/api/moderation/blocklist.ts index 44e3de4e4..c38a7dad4 100644 --- a/server/tests/api/moderation/blocklist.ts +++ b/server/tests/api/moderation/blocklist.ts @@ -14,7 +14,6 @@ import { ServerInfo, setAccessTokensToServers, uploadVideo, - userLogin, waitJobs } from '@shared/extra-utils' import { UserNotificationType, Video } from '@shared/models' @@ -94,7 +93,7 @@ describe('Test blocklist', function () { const user = { username: 'user1', password: 'password' } await createUser({ url: servers[0].url, accessToken: servers[0].accessToken, username: user.username, password: user.password }) - userToken1 = await userLogin(servers[0], user) + userToken1 = await servers[0].loginCommand.getAccessToken(user) await uploadVideo(servers[0].url, userToken1, { name: 'video user 1' }) } @@ -102,14 +101,14 @@ describe('Test blocklist', function () { const user = { username: 'moderator', password: 'password' } await createUser({ url: servers[0].url, accessToken: servers[0].accessToken, username: user.username, password: user.password }) - userModeratorToken = await userLogin(servers[0], user) + userModeratorToken = await servers[0].loginCommand.getAccessToken(user) } { const user = { username: 'user2', password: 'password' } await createUser({ url: servers[1].url, accessToken: servers[1].accessToken, username: user.username, password: user.password }) - userToken2 = await userLogin(servers[1], user) + userToken2 = await servers[1].loginCommand.getAccessToken(user) await uploadVideo(servers[1].url, userToken2, { name: 'video user 2' }) } -- cgit v1.2.3