aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-01-08 14:15:16 +0100
committerChocobozzz <me@florianbigard.com>2020-01-08 14:15:16 +0100
commitfe98765624cdd6695739bda719fcb726b71c2b2a (patch)
tree18b19d427e5c25fc9e5290062f307e668f4c9e45 /server/tests/api/videos
parentddc07312b041c1c533b68a919681fc9bce83430d (diff)
downloadPeerTube-fe98765624cdd6695739bda719fcb726b71c2b2a.tar.gz
PeerTube-fe98765624cdd6695739bda719fcb726b71c2b2a.tar.zst
PeerTube-fe98765624cdd6695739bda719fcb726b71c2b2a.zip
Add ability to skip count query
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/single-server.ts9
1 files changed, 9 insertions, 0 deletions
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 () {
322 expect(videos[0].name).to.equal(videosListBase[5].name) 322 expect(videos[0].name).to.equal(videosListBase[5].name)
323 }) 323 })
324 324
325 it('Should not have the total field', async function () {
326 const res = await getVideosListPagination(server.url, 5, 6, 'name', true)
327
328 const videos = res.body.data
329 expect(res.body.total).to.not.exist
330 expect(videos.length).to.equal(1)
331 expect(videos[0].name).to.equal(videosListBase[5].name)
332 })
333
325 it('Should list and sort by name in descending order', async function () { 334 it('Should list and sort by name in descending order', async function () {
326 const res = await getVideosListSort(server.url, '-name') 335 const res = await getVideosListSort(server.url, '-name')
327 336