aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/friends-basic.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/friends-basic.js')
-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 })