From: Chocobozzz Date: Tue, 4 Sep 2018 06:58:23 +0000 (+0200) Subject: Add trending sort tests X-Git-Tag: v1.0.0-beta.12~45 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=0b74c74abe5a44e9f564ab6adb5177ab17d28e91;p=github%2FChocobozzz%2FPeerTube.git Add trending sort tests --- 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 () { 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',