aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-04 08:58:23 +0200
committerChocobozzz <me@florianbigard.com>2018-09-04 08:58:34 +0200
commit0b74c74abe5a44e9f564ab6adb5177ab17d28e91 (patch)
tree3fcb2c738559d13469d778ab2445178c1a833f2b /server
parent558187a72fc75b22f762af7b6608d15b2420f8df (diff)
downloadPeerTube-0b74c74abe5a44e9f564ab6adb5177ab17d28e91.tar.gz
PeerTube-0b74c74abe5a44e9f564ab6adb5177ab17d28e91.tar.zst
PeerTube-0b74c74abe5a44e9f564ab6adb5177ab17d28e91.zip
Add trending sort tests
Diffstat (limited to 'server')
-rw-r--r--server/tests/api/videos/single-server.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts
index 89408fec6..e3d62b7a0 100644
--- a/server/tests/api/videos/single-server.ts
+++ b/server/tests/api/videos/single-server.ts
@@ -339,6 +339,14 @@ describe('Test a single server', function () {
339 videoId = videos[3].uuid 339 videoId = videos[3].uuid
340 }) 340 })
341 341
342 it('Should list and sort by trending in descending order', async function () {
343 const res = await getVideosListPagination(server.url, 0, 2, '-trending')
344
345 const videos = res.body.data
346 expect(res.body.total).to.equal(6)
347 expect(videos.length).to.equal(2)
348 })
349
342 it('Should update a video', async function () { 350 it('Should update a video', async function () {
343 const attributes = { 351 const attributes = {
344 name: 'my super video updated', 352 name: 'my super video updated',