aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-08-26 18:55:10 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-08-26 18:55:10 +0200
commit535724234aafd90c9eac17d9998f3f1c6c6c7615 (patch)
tree5b37a63037006abd60548877a00208fb97bb9fde /server/tests
parentcc599f34b7a55adbc614898fe8fd63ecc38f5e7d (diff)
downloadPeerTube-535724234aafd90c9eac17d9998f3f1c6c6c7615.tar.gz
PeerTube-535724234aafd90c9eac17d9998f3f1c6c6c7615.tar.zst
PeerTube-535724234aafd90c9eac17d9998f3f1c6c6c7615.zip
Server: add pod created date and score to the list controller
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/friends-basic.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/server/tests/api/friends-basic.js b/server/tests/api/friends-basic.js
index 2a6883acb..2f2f25e25 100644
--- a/server/tests/api/friends-basic.js
+++ b/server/tests/api/friends-basic.js
@@ -6,6 +6,7 @@ const expect = chai.expect
6const series = require('async/series') 6const series = require('async/series')
7 7
8const loginUtils = require('../utils/login') 8const loginUtils = require('../utils/login')
9const miscsUtils = require('../utils/miscs')
9const podsUtils = require('../utils/pods') 10const podsUtils = require('../utils/pods')
10const serversUtils = require('../utils/servers') 11const serversUtils = require('../utils/servers')
11 12
@@ -92,7 +93,11 @@ describe('Test basic friends', function () {
92 const result = res.body 93 const result = res.body
93 expect(result).to.be.an('array') 94 expect(result).to.be.an('array')
94 expect(result.length).to.equal(1) 95 expect(result.length).to.equal(1)
95 expect(result[0].url).to.be.equal(servers[2].url) 96
97 const pod = result[0]
98 expect(pod.url).to.equal(servers[2].url)
99 expect(pod.score).to.equal(20)
100 expect(miscsUtils.dateIsValid(pod.createdDate)).to.be.true
96 101
97 next() 102 next()
98 }) 103 })
@@ -105,7 +110,11 @@ describe('Test basic friends', function () {
105 const result = res.body 110 const result = res.body
106 expect(result).to.be.an('array') 111 expect(result).to.be.an('array')
107 expect(result.length).to.equal(1) 112 expect(result.length).to.equal(1)
108 expect(result[0].url).to.be.equal(servers[1].url) 113
114 const pod = result[0]
115 expect(pod.url).to.equal(servers[1].url)
116 expect(pod.score).to.equal(20)
117 expect(miscsUtils.dateIsValid(pod.createdDate)).to.be.true
109 118
110 next() 119 next()
111 }) 120 })