]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-nsfw.ts
Add advanced search in client
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-nsfw.ts
index 38bdaa54e312c67140d3445c87c5836057d6b9f0..370e69d2a4f15eac3987efcdcfe755cbbf62360e 100644 (file)
@@ -220,6 +220,17 @@ describe('Test video NSFW policy', function () {
         expect(videos[ 0 ].name).to.equal('normal')
       }
     })
+
+    it('Should display both videos when the nsfw param === both', async function () {
+      for (const res of await getVideosFunctions(server.accessToken, { nsfw: 'both' })) {
+        expect(res.body.total).to.equal(2)
+
+        const videos = res.body.data
+        expect(videos).to.have.lengthOf(2)
+        expect(videos[ 0 ].name).to.equal('normal')
+        expect(videos[ 1 ].name).to.equal('nsfw')
+      }
+    })
   })
 
   after(async function () {