diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-08-26 18:55:10 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-08-26 18:55:10 +0200 |
commit | 535724234aafd90c9eac17d9998f3f1c6c6c7615 (patch) | |
tree | 5b37a63037006abd60548877a00208fb97bb9fde /server/tests | |
parent | cc599f34b7a55adbc614898fe8fd63ecc38f5e7d (diff) | |
download | PeerTube-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.js | 13 |
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 | |||
6 | const series = require('async/series') | 6 | const series = require('async/series') |
7 | 7 | ||
8 | const loginUtils = require('../utils/login') | 8 | const loginUtils = require('../utils/login') |
9 | const miscsUtils = require('../utils/miscs') | ||
9 | const podsUtils = require('../utils/pods') | 10 | const podsUtils = require('../utils/pods') |
10 | const serversUtils = require('../utils/servers') | 11 | const 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 | }) |