From 0b18f4aa80df8868bf34605423c7a298dffbb2aa Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 20 Jul 2018 18:31:49 +0200 Subject: Add advanced search in client --- server/tests/api/videos/video-nsfw.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'server/tests/api/videos/video-nsfw.ts') 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 () { 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 () { -- cgit v1.2.3