aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/friendsAdvanced.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-21 19:30:22 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-21 19:30:22 +0200
commit68ce3ae021c9bc11b155044df6d23ba60e91eee4 (patch)
tree7cb162a57994f96703ef8387babdeda17d3b58bc /server/tests/api/friendsAdvanced.js
parent501bc6c2b186f6a724a5b619d15aa44791f13995 (diff)
downloadPeerTube-68ce3ae021c9bc11b155044df6d23ba60e91eee4.tar.gz
PeerTube-68ce3ae021c9bc11b155044df6d23ba60e91eee4.tar.zst
PeerTube-68ce3ae021c9bc11b155044df6d23ba60e91eee4.zip
Add total results field and wrap videos in data field when listing
videos
Diffstat (limited to 'server/tests/api/friendsAdvanced.js')
-rw-r--r--server/tests/api/friendsAdvanced.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/server/tests/api/friendsAdvanced.js b/server/tests/api/friendsAdvanced.js
index f3d5cd4a0..7b895b6b5 100644
--- a/server/tests/api/friendsAdvanced.js
+++ b/server/tests/api/friendsAdvanced.js
@@ -210,8 +210,10 @@ describe('Test advanced friends', function () {
210 function (next) { 210 function (next) {
211 getVideos(1, function (err, res) { 211 getVideos(1, function (err, res) {
212 if (err) throw err 212 if (err) throw err
213 expect(res.body).to.be.an('array') 213
214 expect(res.body.length).to.equal(2) 214 const videos = res.body.data
215 expect(videos).to.be.an('array')
216 expect(videos.length).to.equal(2)
215 217
216 next() 218 next()
217 }) 219 })
@@ -221,8 +223,10 @@ describe('Test advanced friends', function () {
221 223
222 getVideos(2, function (err, res) { 224 getVideos(2, function (err, res) {
223 if (err) throw err 225 if (err) throw err
224 expect(res.body).to.be.an('array') 226
225 expect(res.body.length).to.equal(3) 227 const videos = res.body.data
228 expect(videos).to.be.an('array')
229 expect(videos.length).to.equal(3)
226 done() 230 done()
227 }) 231 })
228 } 232 }
@@ -236,8 +240,9 @@ describe('Test advanced friends', function () {
236 getVideos(1, function (err, res) { 240 getVideos(1, function (err, res) {
237 if (err) throw err 241 if (err) throw err
238 242
239 expect(res.body).to.be.an('array') 243 const videos = res.body.data
240 expect(res.body.length).to.equal(5) 244 expect(videos).to.be.an('array')
245 expect(videos.length).to.equal(5)
241 246
242 done() 247 done()
243 }) 248 })