diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-05-10 21:55:59 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-05-10 21:56:16 +0200 |
commit | 9e5f374090ea0fb16f93edd79d5ad61a55db91e5 (patch) | |
tree | c48f8952d450cc62ed304b0b476d14f42499391f /server/tests/api/multiplePods.js | |
parent | cbe2f7c34822b1bd3b1f8c691f79f0c29cf21f07 (diff) | |
download | PeerTube-9e5f374090ea0fb16f93edd79d5ad61a55db91e5.tar.gz PeerTube-9e5f374090ea0fb16f93edd79d5ad61a55db91e5.tar.zst PeerTube-9e5f374090ea0fb16f93edd79d5ad61a55db91e5.zip |
Add tests for thumbnails
Diffstat (limited to 'server/tests/api/multiplePods.js')
-rw-r--r-- | server/tests/api/multiplePods.js | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/server/tests/api/multiplePods.js b/server/tests/api/multiplePods.js index 4a4532a0f..c19f120ef 100644 --- a/server/tests/api/multiplePods.js +++ b/server/tests/api/multiplePods.js | |||
@@ -110,7 +110,12 @@ describe('Test multiple pods', function () { | |||
110 | expect(video.magnetUri).to.equal.magnetUri | 110 | expect(video.magnetUri).to.equal.magnetUri |
111 | } | 111 | } |
112 | 112 | ||
113 | callback() | 113 | utils.testImage(server.url, 'video_short1.webm', video.thumbnail_path, function (err, test) { |
114 | if (err) throw err | ||
115 | expect(test).to.equal(true) | ||
116 | |||
117 | callback() | ||
118 | }) | ||
114 | }) | 119 | }) |
115 | }, done) | 120 | }, done) |
116 | } | 121 | } |
@@ -160,7 +165,12 @@ describe('Test multiple pods', function () { | |||
160 | expect(video.magnetUri).to.equal.magnetUri | 165 | expect(video.magnetUri).to.equal.magnetUri |
161 | } | 166 | } |
162 | 167 | ||
163 | callback() | 168 | utils.testImage(server.url, 'video_short2.webm', video.thumbnail_path, function (err, test) { |
169 | if (err) throw err | ||
170 | expect(test).to.equal(true) | ||
171 | |||
172 | callback() | ||
173 | }) | ||
164 | }) | 174 | }) |
165 | }, done) | 175 | }, done) |
166 | } | 176 | } |
@@ -231,7 +241,17 @@ describe('Test multiple pods', function () { | |||
231 | expect(video2.magnetUri).to.equal.magnetUri | 241 | expect(video2.magnetUri).to.equal.magnetUri |
232 | } | 242 | } |
233 | 243 | ||
234 | callback() | 244 | utils.testImage(server.url, 'video_short3.webm', video1.thumbnail_path, function (err, test) { |
245 | if (err) throw err | ||
246 | expect(test).to.equal(true) | ||
247 | |||
248 | utils.testImage(server.url, 'video_short.webm', video2.thumbnail_path, function (err, test) { | ||
249 | if (err) throw err | ||
250 | expect(test).to.equal(true) | ||
251 | |||
252 | callback() | ||
253 | }) | ||
254 | }) | ||
235 | }) | 255 | }) |
236 | }, done) | 256 | }, done) |
237 | } | 257 | } |