X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideo-playlists.ts;h=9fd48ac7c0b52a5bd971c19a69ab4ffc057965e2;hb=fe98765624cdd6695739bda719fcb726b71c2b2a;hp=7d5e3914bf9808d9202742f91337c63eee7a3f96;hpb=bfbd912886eba17b4aa9a40dcef2fddc685d85bf;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts index 7d5e3914b..9fd48ac7c 100644 --- a/server/tests/api/videos/video-playlists.ts +++ b/server/tests/api/videos/video-playlists.ts @@ -344,6 +344,7 @@ describe('Test video playlists', function () { }) describe('List playlists', function () { + it('Should correctly list the playlists', async function () { this.timeout(30000) @@ -406,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 () {