From 6fcd19ba737f1f5614a56c6925adb882dea43b8d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 5 Jul 2017 13:26:25 +0200 Subject: Move to promises Closes https://github.com/Chocobozzz/PeerTube/issues/74 --- server/tests/api/friends-advanced.js | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'server/tests') diff --git a/server/tests/api/friends-advanced.js b/server/tests/api/friends-advanced.js index 237cb533d..917583a42 100644 --- a/server/tests/api/friends-advanced.js +++ b/server/tests/api/friends-advanced.js @@ -171,6 +171,23 @@ describe('Test advanced friends', function () { function (next) { setTimeout(next, 22000) }, + // Check the pods 1, 2 expulsed pod 4 + function (next) { + each([ 1, 2 ], function (i, callback) { + getFriendsList(i, function (err, res) { + if (err) throw err + + // Pod 4 should not be our friend + const result = res.body.data + expect(result.length).to.equal(2) + for (const pod of result) { + expect(pod.host).not.equal(servers[3].host) + } + + callback() + }) + }, next) + }, // Rerun server 4 function (next) { serversUtils.runServer(4, function (server) { @@ -187,7 +204,7 @@ describe('Test advanced friends', function () { next() }) }, - // Pod 6 ask pod 1, 2 and 3 + // Pod 6 asks pod 1, 2 and 3 function (next) { makeFriends(6, next) }, -- cgit v1.2.3