aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/video-transcoder.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/video-transcoder.js')
-rw-r--r--server/tests/api/video-transcoder.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/tests/api/video-transcoder.js b/server/tests/api/video-transcoder.js
index c0b597668..c7af3cf11 100644
--- a/server/tests/api/video-transcoder.js
+++ b/server/tests/api/video-transcoder.js
@@ -56,9 +56,10 @@ describe('Test video transcoding', function () {
56 if (err) throw err 56 if (err) throw err
57 57
58 const video = res.body.data[0] 58 const video = res.body.data[0]
59 expect(video.magnetUri).to.match(/\.webm/) 59 const magnetUri = video.files[0].magnetUri
60 expect(magnetUri).to.match(/\.webm/)
60 61
61 webtorrent.add(video.magnetUri, function (torrent) { 62 webtorrent.add(magnetUri, function (torrent) {
62 expect(torrent.files).to.exist 63 expect(torrent.files).to.exist
63 expect(torrent.files.length).to.equal(1) 64 expect(torrent.files.length).to.equal(1)
64 expect(torrent.files[0].path).match(/\.webm$/) 65 expect(torrent.files[0].path).match(/\.webm$/)
@@ -86,9 +87,10 @@ describe('Test video transcoding', function () {
86 if (err) throw err 87 if (err) throw err
87 88
88 const video = res.body.data[0] 89 const video = res.body.data[0]
89 expect(video.magnetUri).to.match(/\.mp4/) 90 const magnetUri = video.files[0].magnetUri
91 expect(magnetUri).to.match(/\.mp4/)
90 92
91 webtorrent.add(video.magnetUri, function (torrent) { 93 webtorrent.add(magnetUri, function (torrent) {
92 expect(torrent.files).to.exist 94 expect(torrent.files).to.exist
93 expect(torrent.files.length).to.equal(1) 95 expect(torrent.files.length).to.equal(1)
94 expect(torrent.files[0].path).match(/\.mp4$/) 96 expect(torrent.files[0].path).match(/\.mp4$/)