]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/single-server.ts
Merge branch 'release/2.1.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / single-server.ts
index d8f394ac749b6cc5c2ca646b74fcf6ddd750ecbe..596fff9965fb045a969392d33bd5b707e4422f00 100644 (file)
@@ -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')