diff options
Diffstat (limited to 'server/tests/utils/videos')
-rw-r--r-- | server/tests/utils/videos/video-blacklist.ts | 2 | ||||
-rw-r--r-- | server/tests/utils/videos/video-channels.ts | 4 | ||||
-rw-r--r-- | server/tests/utils/videos/videos.ts | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/utils/videos/video-blacklist.ts b/server/tests/utils/videos/video-blacklist.ts index 3a499f46a..aa0d232b6 100644 --- a/server/tests/utils/videos/video-blacklist.ts +++ b/server/tests/utils/videos/video-blacklist.ts | |||
@@ -10,7 +10,7 @@ function addVideoToBlacklist (url: string, token: string, videoId: number, speci | |||
10 | .expect(specialStatus) | 10 | .expect(specialStatus) |
11 | } | 11 | } |
12 | 12 | ||
13 | function removeVideoFromBlacklist (url: string, token: string, videoId: number, specialStatus = 204) { | 13 | function removeVideoFromBlacklist (url: string, token: string, videoId: number | string, specialStatus = 204) { |
14 | const path = '/api/v1/videos/' + videoId + '/blacklist' | 14 | const path = '/api/v1/videos/' + videoId + '/blacklist' |
15 | 15 | ||
16 | return request(url) | 16 | return request(url) |
diff --git a/server/tests/utils/videos/video-channels.ts b/server/tests/utils/videos/video-channels.ts index 0fb80d331..062ca8f4d 100644 --- a/server/tests/utils/videos/video-channels.ts +++ b/server/tests/utils/videos/video-channels.ts | |||
@@ -20,13 +20,13 @@ function getVideoChannelsList (url: string, start: number, count: number, sort?: | |||
20 | .expect('Content-Type', /json/) | 20 | .expect('Content-Type', /json/) |
21 | } | 21 | } |
22 | 22 | ||
23 | function getAccountVideoChannelsList (url: string, accountId: number | string) { | 23 | function getAccountVideoChannelsList (url: string, accountId: number | string, specialStatus = 200) { |
24 | const path = '/api/v1/videos/accounts/' + accountId + '/channels' | 24 | const path = '/api/v1/videos/accounts/' + accountId + '/channels' |
25 | 25 | ||
26 | return request(url) | 26 | return request(url) |
27 | .get(path) | 27 | .get(path) |
28 | .set('Accept', 'application/json') | 28 | .set('Accept', 'application/json') |
29 | .expect(200) | 29 | .expect(specialStatus) |
30 | .expect('Content-Type', /json/) | 30 | .expect('Content-Type', /json/) |
31 | } | 31 | } |
32 | 32 | ||
diff --git a/server/tests/utils/videos/videos.ts b/server/tests/utils/videos/videos.ts index fefee4878..166253ffc 100644 --- a/server/tests/utils/videos/videos.ts +++ b/server/tests/utils/videos/videos.ts | |||
@@ -143,7 +143,7 @@ function getVideosListSort (url: string, sort: string) { | |||
143 | .expect('Content-Type', /json/) | 143 | .expect('Content-Type', /json/) |
144 | } | 144 | } |
145 | 145 | ||
146 | function removeVideo (url: string, token: string, id: number, expectedStatus = 204) { | 146 | function removeVideo (url: string, token: string, id: number | string, expectedStatus = 204) { |
147 | const path = '/api/v1/videos' | 147 | const path = '/api/v1/videos' |
148 | 148 | ||
149 | return request(url) | 149 | return request(url) |