projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
558187a
)
Add trending sort tests
author
Chocobozzz
<me@florianbigard.com>
Tue, 4 Sep 2018 06:58:23 +0000
(08:58 +0200)
committer
Chocobozzz
<me@florianbigard.com>
Tue, 4 Sep 2018 06:58:34 +0000
(08:58 +0200)
server/tests/api/videos/single-server.ts
patch
|
blob
|
history
diff --git
a/server/tests/api/videos/single-server.ts
b/server/tests/api/videos/single-server.ts
index 89408fec6580b4236abaa820e0ba4fcc45cecc12..e3d62b7a0df4c1dfa41ccf40f47557c514624256 100644
(file)
--- 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',