diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-07-05 13:26:25 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-07-05 14:14:16 +0200 |
commit | 6fcd19ba737f1f5614a56c6925adb882dea43b8d (patch) | |
tree | 3365a96d82bc7f00ae504a568725c8e914150cf8 /server/tests | |
parent | 5fe7e898316e18369c3e1aba307b55077adc7bfb (diff) | |
download | PeerTube-6fcd19ba737f1f5614a56c6925adb882dea43b8d.tar.gz PeerTube-6fcd19ba737f1f5614a56c6925adb882dea43b8d.tar.zst PeerTube-6fcd19ba737f1f5614a56c6925adb882dea43b8d.zip |
Move to promises
Closes https://github.com/Chocobozzz/PeerTube/issues/74
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/friends-advanced.js | 19 |
1 files changed, 18 insertions, 1 deletions
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 () { | |||
171 | function (next) { | 171 | function (next) { |
172 | setTimeout(next, 22000) | 172 | setTimeout(next, 22000) |
173 | }, | 173 | }, |
174 | // Check the pods 1, 2 expulsed pod 4 | ||
175 | function (next) { | ||
176 | each([ 1, 2 ], function (i, callback) { | ||
177 | getFriendsList(i, function (err, res) { | ||
178 | if (err) throw err | ||
179 | |||
180 | // Pod 4 should not be our friend | ||
181 | const result = res.body.data | ||
182 | expect(result.length).to.equal(2) | ||
183 | for (const pod of result) { | ||
184 | expect(pod.host).not.equal(servers[3].host) | ||
185 | } | ||
186 | |||
187 | callback() | ||
188 | }) | ||
189 | }, next) | ||
190 | }, | ||
174 | // Rerun server 4 | 191 | // Rerun server 4 |
175 | function (next) { | 192 | function (next) { |
176 | serversUtils.runServer(4, function (server) { | 193 | serversUtils.runServer(4, function (server) { |
@@ -187,7 +204,7 @@ describe('Test advanced friends', function () { | |||
187 | next() | 204 | next() |
188 | }) | 205 | }) |
189 | }, | 206 | }, |
190 | // Pod 6 ask pod 1, 2 and 3 | 207 | // Pod 6 asks pod 1, 2 and 3 |
191 | function (next) { | 208 | function (next) { |
192 | makeFriends(6, next) | 209 | makeFriends(6, next) |
193 | }, | 210 | }, |