aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/video-nsfw.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-20 18:31:49 +0200
committerChocobozzz <me@florianbigard.com>2018-07-24 14:04:05 +0200
commit0b18f4aa80df8868bf34605423c7a298dffbb2aa (patch)
tree25299da5d94fc73e88b21e87aeb2c156999c6fcd /server/tests/api/videos/video-nsfw.ts
parentd525fc399a14a8b16eaad6d4c0bc0a9c4093c3c9 (diff)
downloadPeerTube-0b18f4aa80df8868bf34605423c7a298dffbb2aa.tar.gz
PeerTube-0b18f4aa80df8868bf34605423c7a298dffbb2aa.tar.zst
PeerTube-0b18f4aa80df8868bf34605423c7a298dffbb2aa.zip
Add advanced search in client
Diffstat (limited to 'server/tests/api/videos/video-nsfw.ts')
-rw-r--r--server/tests/api/videos/video-nsfw.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts
index 38bdaa54e..370e69d2a 100644
--- a/server/tests/api/videos/video-nsfw.ts
+++ b/server/tests/api/videos/video-nsfw.ts
@@ -220,6 +220,17 @@ describe('Test video NSFW policy', function () {
220 expect(videos[ 0 ].name).to.equal('normal') 220 expect(videos[ 0 ].name).to.equal('normal')
221 } 221 }
222 }) 222 })
223
224 it('Should display both videos when the nsfw param === both', async function () {
225 for (const res of await getVideosFunctions(server.accessToken, { nsfw: 'both' })) {
226 expect(res.body.total).to.equal(2)
227
228 const videos = res.body.data
229 expect(videos).to.have.lengthOf(2)
230 expect(videos[ 0 ].name).to.equal('normal')
231 expect(videos[ 1 ].name).to.equal('nsfw')
232 }
233 })
223 }) 234 })
224 235
225 after(async function () { 236 after(async function () {