From fe98765624cdd6695739bda719fcb726b71c2b2a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 8 Jan 2020 14:15:16 +0100 Subject: Add ability to skip count query --- server/tests/api/videos/single-server.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'server/tests/api/videos') diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index d8f394ac7..362d6b78f 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts @@ -322,6 +322,15 @@ describe('Test a single server', function () { expect(videos[0].name).to.equal(videosListBase[5].name) }) + it('Should not have the total field', async function () { + const res = await getVideosListPagination(server.url, 5, 6, 'name', true) + + const videos = res.body.data + expect(res.body.total).to.not.exist + expect(videos.length).to.equal(1) + expect(videos[0].name).to.equal(videosListBase[5].name) + }) + it('Should list and sort by name in descending order', async function () { const res = await getVideosListSort(server.url, '-name') -- cgit v1.2.3