]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/single-server.ts
Increase test timeout
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / single-server.ts
index b74bc3e80912f6b49d27d3b09be5ddc28b89ca63..da90223b820ba17abbb885e5706a88fcbe567f3a 100644 (file)
@@ -355,6 +355,22 @@ describe('Test a single server', function () {
     expect(videos.length).to.equal(2)
   })
 
+  it('Should list and sort by hotness in descending order', async function () {
+    const res = await getVideosListPagination(server.url, 0, 2, '-hot')
+
+    const videos = res.body.data
+    expect(res.body.total).to.equal(6)
+    expect(videos.length).to.equal(2)
+  })
+
+  it('Should list and sort by best in descending order', async function () {
+    const res = await getVideosListPagination(server.url, 0, 2, '-best')
+
+    const videos = res.body.data
+    expect(res.body.total).to.equal(6)
+    expect(videos.length).to.equal(2)
+  })
+
   it('Should update a video', async function () {
     const attributes = {
       name: 'my super video updated',