diff options
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/check-params/config.ts | 2 | ||||
-rw-r--r-- | server/tests/api/server/config.ts | 2 | ||||
-rw-r--r-- | server/tests/api/videos/single-server.ts | 8 |
3 files changed, 10 insertions, 2 deletions
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index e6309b5f7..d6c20f7af 100644 --- a/server/tests/api/check-params/config.ts +++ b/server/tests/api/check-params/config.ts | |||
@@ -141,7 +141,7 @@ describe('Test config API validators', function () { | |||
141 | trending: { | 141 | trending: { |
142 | videos: { | 142 | videos: { |
143 | algorithms: { | 143 | algorithms: { |
144 | enabled: [ 'hot', 'most-viewed', 'most-liked' ], | 144 | enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ], |
145 | default: 'most-viewed' | 145 | default: 'most-viewed' |
146 | } | 146 | } |
147 | } | 147 | } |
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index e5bab0b77..26df8373e 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts | |||
@@ -375,7 +375,7 @@ describe('Test config', function () { | |||
375 | trending: { | 375 | trending: { |
376 | videos: { | 376 | videos: { |
377 | algorithms: { | 377 | algorithms: { |
378 | enabled: [ 'hot', 'most-viewed', 'most-liked' ], | 378 | enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ], |
379 | default: 'hot' | 379 | default: 'hot' |
380 | } | 380 | } |
381 | } | 381 | } |
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts index 52c6800c1..da90223b8 100644 --- a/server/tests/api/videos/single-server.ts +++ b/server/tests/api/videos/single-server.ts | |||
@@ -363,6 +363,14 @@ describe('Test a single server', function () { | |||
363 | expect(videos.length).to.equal(2) | 363 | expect(videos.length).to.equal(2) |
364 | }) | 364 | }) |
365 | 365 | ||
366 | it('Should list and sort by best in descending order', async function () { | ||
367 | const res = await getVideosListPagination(server.url, 0, 2, '-best') | ||
368 | |||
369 | const videos = res.body.data | ||
370 | expect(res.body.total).to.equal(6) | ||
371 | expect(videos.length).to.equal(2) | ||
372 | }) | ||
373 | |||
366 | it('Should update a video', async function () { | 374 | it('Should update a video', async function () { |
367 | const attributes = { | 375 | const attributes = { |
368 | name: 'my super video updated', | 376 | name: 'my super video updated', |