aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/video-nsfw.ts
diff options
context:
space:
mode:
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 () {