diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-04 08:58:23 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-04 08:58:34 +0200 |
commit | 0b74c74abe5a44e9f564ab6adb5177ab17d28e91 (patch) | |
tree | 3fcb2c738559d13469d778ab2445178c1a833f2b /server/tests/api/videos | |
parent | 558187a72fc75b22f762af7b6608d15b2420f8df (diff) | |
download | PeerTube-0b74c74abe5a44e9f564ab6adb5177ab17d28e91.tar.gz PeerTube-0b74c74abe5a44e9f564ab6adb5177ab17d28e91.tar.zst PeerTube-0b74c74abe5a44e9f564ab6adb5177ab17d28e91.zip |
Add trending sort tests
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r-- | server/tests/api/videos/single-server.ts | 8 |
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', |