aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/friendsBasic.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-11 21:19:34 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-13 14:23:11 +0200
commitbc503c2a62dcf9aed6b8d90b68f0f27a7755ac01 (patch)
treea1fe1ad88afd29ee4d7cb05c480649d5a9c6f9a0 /server/tests/api/friendsBasic.js
parent881a5e68b64e4acd43408852bbdc914643d8fac6 (diff)
downloadPeerTube-bc503c2a62dcf9aed6b8d90b68f0f27a7755ac01.tar.gz
PeerTube-bc503c2a62dcf9aed6b8d90b68f0f27a7755ac01.tar.zst
PeerTube-bc503c2a62dcf9aed6b8d90b68f0f27a7755ac01.zip
Update to standard 7. Goodbye snake_case, I used to love you
Diffstat (limited to 'server/tests/api/friendsBasic.js')
-rw-r--r--server/tests/api/friendsBasic.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/server/tests/api/friendsBasic.js b/server/tests/api/friendsBasic.js
index 49e51804f..c9e3bc9ad 100644
--- a/server/tests/api/friendsBasic.js
+++ b/server/tests/api/friendsBasic.js
@@ -10,25 +10,25 @@ const utils = require('./utils')
10describe('Test basic friends', function () { 10describe('Test basic friends', function () {
11 let servers = [] 11 let servers = []
12 12
13 function testMadeFriends (servers, server_to_test, callback) { 13 function testMadeFriends (servers, serverToTest, callback) {
14 const friends = [] 14 const friends = []
15 for (let i = 0; i < servers.length; i++) { 15 for (let i = 0; i < servers.length; i++) {
16 if (servers[i].url === server_to_test.url) continue 16 if (servers[i].url === serverToTest.url) continue
17 friends.push(servers[i].url) 17 friends.push(servers[i].url)
18 } 18 }
19 19
20 utils.getFriendsList(server_to_test.url, function (err, res) { 20 utils.getFriendsList(serverToTest.url, function (err, res) {
21 if (err) throw err 21 if (err) throw err
22 22
23 const result = res.body 23 const result = res.body
24 const result_urls = [ result[0].url, result[1].url ] 24 const resultUrls = [ result[0].url, result[1].url ]
25 expect(result).to.be.an('array') 25 expect(result).to.be.an('array')
26 expect(result.length).to.equal(2) 26 expect(result.length).to.equal(2)
27 expect(result_urls[0]).to.not.equal(result_urls[1]) 27 expect(resultUrls[0]).to.not.equal(resultUrls[1])
28 28
29 const error_string = 'Friends url do not correspond for ' + server_to_test.url 29 const errorString = 'Friends url do not correspond for ' + serverToTest.url
30 expect(friends).to.contain(result_urls[0], error_string) 30 expect(friends).to.contain(resultUrls[0], errorString)
31 expect(friends).to.contain(result_urls[1], error_string) 31 expect(friends).to.contain(resultUrls[1], errorString)
32 callback() 32 callback()
33 }) 33 })
34 } 34 }
@@ -37,8 +37,8 @@ describe('Test basic friends', function () {
37 37
38 before(function (done) { 38 before(function (done) {
39 this.timeout(20000) 39 this.timeout(20000)
40 utils.flushAndRunMultipleServers(3, function (servers_run, urls_run) { 40 utils.flushAndRunMultipleServers(3, function (serversRun, urlsRun) {
41 servers = servers_run 41 servers = serversRun
42 done() 42 done()
43 }) 43 })
44 }) 44 })