X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fsingle-server.ts;h=596fff9965fb045a969392d33bd5b707e4422f00;hb=134cf2bce96a8c5aefd55154e884964975d8cf23;hp=d8f394ac749b6cc5c2ca646b74fcf6ddd750ecbe;hpb=21d141c296541f41e399ec68aa7fa85e53d0dcb8;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index d8f394ac7..596fff996 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-unused-expression */ +/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ import * as chai from 'chai' import { keyBy } from 'lodash' @@ -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')