]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/single-server.ts
Dissociate video file names and video uuid
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / single-server.ts
index 0ae405950b54025e949eed4c412fa8b0f101106c..da90223b820ba17abbb885e5706a88fcbe567f3a 100644 (file)
@@ -157,6 +157,8 @@ describe('Test a single server', function () {
   })
 
   it('Should upload the video', async function () {
+    this.timeout(10000)
+
     const videoAttributes = {
       name: 'my super name',
       category: 2,
@@ -353,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',