From 822c7e610d19e3320519a6ae5c90c01db971f03f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 27 Dec 2019 09:04:04 +0100 Subject: Fix playlist search --- server/tests/api/videos/video-playlists.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'server/tests/api') diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts index 424b217fb..9fd48ac7c 100644 --- a/server/tests/api/videos/video-playlists.ts +++ b/server/tests/api/videos/video-playlists.ts @@ -407,6 +407,25 @@ describe('Test video playlists', function () { expect(data).to.have.lengthOf(1) expect(data[ 0 ].displayName).to.equal('playlist 3') } + + { + const res = await getAccountPlaylistsList(servers[ 1 ].url, 'root', 0, 10, 'createdAt', '3') + + expect(res.body.total).to.equal(1) + + const data: VideoPlaylist[] = res.body.data + expect(data).to.have.lengthOf(1) + expect(data[ 0 ].displayName).to.equal('playlist 3') + } + + { + const res = await getAccountPlaylistsList(servers[ 1 ].url, 'root', 0, 10, 'createdAt', '4') + + expect(res.body.total).to.equal(0) + + const data: VideoPlaylist[] = res.body.data + expect(data).to.have.lengthOf(0) + } }) it('Should not list unlisted or private playlists', async function () { -- cgit v1.2.3