diff options
Diffstat (limited to 'server/tests/api/check-params/video-blacklist.ts')
-rw-r--r-- | server/tests/api/check-params/video-blacklist.ts | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/server/tests/api/check-params/video-blacklist.ts b/server/tests/api/check-params/video-blacklist.ts index 6466888fb..145f43980 100644 --- a/server/tests/api/check-params/video-blacklist.ts +++ b/server/tests/api/check-params/video-blacklist.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | /* tslint:disable:no-unused-expression */ | 1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ |
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | 4 | ||
@@ -7,25 +7,24 @@ import { | |||
7 | createUser, | 7 | createUser, |
8 | doubleFollow, | 8 | doubleFollow, |
9 | flushAndRunMultipleServers, | 9 | flushAndRunMultipleServers, |
10 | flushTests, | ||
11 | getBlacklistedVideosList, | 10 | getBlacklistedVideosList, |
12 | getVideo, | 11 | getVideo, |
13 | getVideoWithToken, | 12 | getVideoWithToken, |
14 | killallServers, | ||
15 | makePostBodyRequest, | 13 | makePostBodyRequest, |
16 | makePutBodyRequest, | 14 | makePutBodyRequest, |
17 | removeVideoFromBlacklist, | 15 | removeVideoFromBlacklist, |
18 | ServerInfo, | 16 | ServerInfo, |
19 | setAccessTokensToServers, | 17 | setAccessTokensToServers, |
20 | uploadVideo, | 18 | uploadVideo, |
21 | userLogin, waitJobs | 19 | userLogin, |
20 | waitJobs | ||
22 | } from '../../../../shared/extra-utils' | 21 | } from '../../../../shared/extra-utils' |
23 | import { | 22 | import { |
24 | checkBadCountPagination, | 23 | checkBadCountPagination, |
25 | checkBadSortPagination, | 24 | checkBadSortPagination, |
26 | checkBadStartPagination | 25 | checkBadStartPagination |
27 | } from '../../../../shared/extra-utils/requests/check-api-params' | 26 | } from '../../../../shared/extra-utils/requests/check-api-params' |
28 | import { VideoDetails, VideoBlacklistType } from '../../../../shared/models/videos' | 27 | import { VideoBlacklistType, VideoDetails } from '../../../../shared/models/videos' |
29 | import { expect } from 'chai' | 28 | import { expect } from 'chai' |
30 | 29 | ||
31 | describe('Test video blacklist API validators', function () { | 30 | describe('Test video blacklist API validators', function () { |
@@ -48,14 +47,14 @@ describe('Test video blacklist API validators', function () { | |||
48 | { | 47 | { |
49 | const username = 'user1' | 48 | const username = 'user1' |
50 | const password = 'my super password' | 49 | const password = 'my super password' |
51 | await createUser({ url: servers[ 0 ].url, accessToken: servers[ 0 ].accessToken, username: username, password: password }) | 50 | await createUser({ url: servers[0].url, accessToken: servers[0].accessToken, username: username, password: password }) |
52 | userAccessToken1 = await userLogin(servers[0], { username, password }) | 51 | userAccessToken1 = await userLogin(servers[0], { username, password }) |
53 | } | 52 | } |
54 | 53 | ||
55 | { | 54 | { |
56 | const username = 'user2' | 55 | const username = 'user2' |
57 | const password = 'my super password' | 56 | const password = 'my super password' |
58 | await createUser({ url: servers[ 0 ].url, accessToken: servers[ 0 ].accessToken, username: username, password: password }) | 57 | await createUser({ url: servers[0].url, accessToken: servers[0].accessToken, username: username, password: password }) |
59 | userAccessToken2 = await userLogin(servers[0], { username, password }) | 58 | userAccessToken2 = await userLogin(servers[0], { username, password }) |
60 | } | 59 | } |
61 | 60 | ||
@@ -120,7 +119,7 @@ describe('Test video blacklist API validators', function () { | |||
120 | 119 | ||
121 | it('Should succeed with the correct params', async function () { | 120 | it('Should succeed with the correct params', async function () { |
122 | const path = basePath + servers[0].video.uuid + '/blacklist' | 121 | const path = basePath + servers[0].video.uuid + '/blacklist' |
123 | const fields = { } | 122 | const fields = {} |
124 | 123 | ||
125 | await makePostBodyRequest({ url: servers[0].url, path, token: servers[0].accessToken, fields, statusCodeExpected: 204 }) | 124 | await makePostBodyRequest({ url: servers[0].url, path, token: servers[0].accessToken, fields, statusCodeExpected: 204 }) |
126 | }) | 125 | }) |