aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/video-blacklist.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params/video-blacklist.ts')
-rw-r--r--server/tests/api/check-params/video-blacklist.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/server/tests/api/check-params/video-blacklist.ts b/server/tests/api/check-params/video-blacklist.ts
index 6b82643f4..fc039e847 100644
--- a/server/tests/api/check-params/video-blacklist.ts
+++ b/server/tests/api/check-params/video-blacklist.ts
@@ -8,6 +8,7 @@ import {
8 flushAndRunMultipleServers, 8 flushAndRunMultipleServers,
9 flushTests, 9 flushTests,
10 getBlacklistedVideosList, 10 getBlacklistedVideosList,
11 getBlacklistedVideosListWithTypeFilter,
11 getVideo, 12 getVideo,
12 getVideoWithToken, 13 getVideoWithToken,
13 killallServers, 14 killallServers,
@@ -24,7 +25,7 @@ import {
24 checkBadSortPagination, 25 checkBadSortPagination,
25 checkBadStartPagination 26 checkBadStartPagination
26} from '../../../../shared/utils/requests/check-api-params' 27} from '../../../../shared/utils/requests/check-api-params'
27import { VideoDetails } from '../../../../shared/models/videos' 28import { VideoDetails, VideoBlacklistType } from '../../../../shared/models/videos'
28import { expect } from 'chai' 29import { expect } from 'chai'
29 30
30describe('Test video blacklist API validators', function () { 31describe('Test video blacklist API validators', function () {
@@ -238,6 +239,14 @@ describe('Test video blacklist API validators', function () {
238 it('Should fail with an incorrect sort', async function () { 239 it('Should fail with an incorrect sort', async function () {
239 await checkBadSortPagination(servers[0].url, basePath, servers[0].accessToken) 240 await checkBadSortPagination(servers[0].url, basePath, servers[0].accessToken)
240 }) 241 })
242
243 it('Should fail with an invalid type', async function () {
244 await getBlacklistedVideosListWithTypeFilter(servers[0].url, servers[0].accessToken, 0, 400)
245 })
246
247 it('Should succeed with the correct parameters', async function () {
248 await getBlacklistedVideosListWithTypeFilter(servers[0].url, servers[0].accessToken, VideoBlacklistType.MANUAL)
249 })
241 }) 250 })
242 251
243 after(async function () { 252 after(async function () {