]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/video-blacklist.ts
Add notification on new instance follower (server side)
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / video-blacklist.ts
index 6b82643f4fbcbfa2e9f74f144e224ee9f98025a6..fc039e8472129be5003d93aad6a4b83f19711915 100644 (file)
@@ -8,6 +8,7 @@ import {
   flushAndRunMultipleServers,
   flushTests,
   getBlacklistedVideosList,
+  getBlacklistedVideosListWithTypeFilter,
   getVideo,
   getVideoWithToken,
   killallServers,
@@ -24,7 +25,7 @@ import {
   checkBadSortPagination,
   checkBadStartPagination
 } from '../../../../shared/utils/requests/check-api-params'
-import { VideoDetails } from '../../../../shared/models/videos'
+import { VideoDetails, VideoBlacklistType } from '../../../../shared/models/videos'
 import { expect } from 'chai'
 
 describe('Test video blacklist API validators', function () {
@@ -238,6 +239,14 @@ describe('Test video blacklist API validators', function () {
     it('Should fail with an incorrect sort', async function () {
       await checkBadSortPagination(servers[0].url, basePath, servers[0].accessToken)
     })
+
+    it('Should fail with an invalid type', async function () {
+      await getBlacklistedVideosListWithTypeFilter(servers[0].url, servers[0].accessToken, 0, 400)
+    })
+
+    it('Should succeed with the correct parameters', async function () {
+      await getBlacklistedVideosListWithTypeFilter(servers[0].url, servers[0].accessToken, VideoBlacklistType.MANUAL)
+    })
   })
 
   after(async function () {