From 923d3d5ad53cd23bf8107e936408e321f6175517 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Thu, 28 Jan 2021 14:43:02 +0100 Subject: add test and openapi for hot sort parameter --- server/tests/api/videos/single-server.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'server/tests/api/videos') diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index b74bc3e80..52c6800c1 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts @@ -355,6 +355,14 @@ 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 update a video', async function () { const attributes = { name: 'my super video updated', -- cgit v1.2.3