]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/single-server.ts
Merge branch 'release/v1.0.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / single-server.ts
index 89408fec6580b4236abaa820e0ba4fcc45cecc12..089c3df25990b07f2a831f896b2fb816b1489dff 100644 (file)
@@ -118,7 +118,7 @@ describe('Test a single server', function () {
     const categories = res.body
     expect(Object.keys(categories)).to.have.length.above(10)
 
-    expect(categories[11]).to.equal('News')
+    expect(categories[11]).to.equal('News & Politics')
   })
 
   it('Should list video licences', async function () {
@@ -339,6 +339,14 @@ describe('Test a single server', function () {
     videoId = videos[3].uuid
   })
 
+  it('Should list and sort by trending in descending order', async function () {
+    const res = await getVideosListPagination(server.url, 0, 2, '-trending')
+
+    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',