diff options
Diffstat (limited to 'server/tests/api/check-params/video-imports.ts')
-rw-r--r-- | server/tests/api/check-params/video-imports.ts | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts index 51260affa..d09e473de 100644 --- a/server/tests/api/check-params/video-imports.ts +++ b/server/tests/api/check-params/video-imports.ts | |||
@@ -9,9 +9,7 @@ import { | |||
9 | checkBadSortPagination, | 9 | checkBadSortPagination, |
10 | checkBadStartPagination, | 10 | checkBadStartPagination, |
11 | cleanupTests, | 11 | cleanupTests, |
12 | createUser, | ||
13 | flushAndRunServer, | 12 | flushAndRunServer, |
14 | getMyUserInformation, | ||
15 | ImportsCommand, | 13 | ImportsCommand, |
16 | makeGetRequest, | 14 | makeGetRequest, |
17 | makePostBodyRequest, | 15 | makePostBodyRequest, |
@@ -38,12 +36,12 @@ describe('Test video imports API validator', function () { | |||
38 | 36 | ||
39 | const username = 'user1' | 37 | const username = 'user1' |
40 | const password = 'my super password' | 38 | const password = 'my super password' |
41 | await createUser({ url: server.url, accessToken: server.accessToken, username: username, password: password }) | 39 | await server.usersCommand.create({ username: username, password: password }) |
42 | userAccessToken = await server.loginCommand.getAccessToken({ username, password }) | 40 | userAccessToken = await server.loginCommand.getAccessToken({ username, password }) |
43 | 41 | ||
44 | { | 42 | { |
45 | const res = await getMyUserInformation(server.url, server.accessToken) | 43 | const { videoChannels } = await server.usersCommand.getMyInfo() |
46 | channelId = res.body.videoChannels[0].id | 44 | channelId = videoChannels[0].id |
47 | } | 45 | } |
48 | }) | 46 | }) |
49 | 47 | ||
@@ -164,11 +162,11 @@ describe('Test video imports API validator', function () { | |||
164 | username: 'fake', | 162 | username: 'fake', |
165 | password: 'fake_password' | 163 | password: 'fake_password' |
166 | } | 164 | } |
167 | await createUser({ url: server.url, accessToken: server.accessToken, username: user.username, password: user.password }) | 165 | await server.usersCommand.create({ username: user.username, password: user.password }) |
168 | 166 | ||
169 | const accessTokenUser = await server.loginCommand.getAccessToken(user) | 167 | const accessTokenUser = await server.loginCommand.getAccessToken(user) |
170 | const res = await getMyUserInformation(server.url, accessTokenUser) | 168 | const { videoChannels } = await server.usersCommand.getMyInfo({ token: accessTokenUser }) |
171 | const customChannelId = res.body.videoChannels[0].id | 169 | const customChannelId = videoChannels[0].id |
172 | 170 | ||
173 | const fields = { ...baseCorrectParams, channelId: customChannelId } | 171 | const fields = { ...baseCorrectParams, channelId: customChannelId } |
174 | 172 | ||