aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/single-server.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2021-02-02 12:59:41 +0100
committerChocobozzz <chocobozzz@cpy.re>2021-02-04 09:04:47 +0100
commit3d4e112d16471703f51a542c0cc6e73a6f5db628 (patch)
treecb4a53a50f9bc14a87b62ccfa9d398feb4bbcbc8 /server/tests/api/videos/single-server.ts
parentf6267b610145033ee26ca8a4a7c2b97eca65072e (diff)
downloadPeerTube-3d4e112d16471703f51a542c0cc6e73a6f5db628.tar.gz
PeerTube-3d4e112d16471703f51a542c0cc6e73a6f5db628.tar.zst
PeerTube-3d4e112d16471703f51a542c0cc6e73a6f5db628.zip
add best trending strategy based on Reddit's best
inspired from https://www.reddit.com/r/changelog/comments/7spgg0/best_is_the_new_hotness/ this implementation only adds freshness, and doesn't personalize based on subscribed communities yet.
Diffstat (limited to 'server/tests/api/videos/single-server.ts')
-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 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',