X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideo-transcoder.js;h=c7af3cf11960b116f23be55c1dcd0781531443ba;hb=b0f9f39ed70299a208d1b388c72de8b7f3510cb7;hp=c0b59766897323081f1472039f52d00ad27ffcf3;hpb=e02643f32e4c97ca307f8fc5b69be79c40d70a3b;p=github%2FChocobozzz%2FPeerTube.git 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 () { if (err) throw err const video = res.body.data[0] - expect(video.magnetUri).to.match(/\.webm/) + const magnetUri = video.files[0].magnetUri + expect(magnetUri).to.match(/\.webm/) - webtorrent.add(video.magnetUri, function (torrent) { + webtorrent.add(magnetUri, function (torrent) { expect(torrent.files).to.exist expect(torrent.files.length).to.equal(1) expect(torrent.files[0].path).match(/\.webm$/) @@ -86,9 +87,10 @@ describe('Test video transcoding', function () { if (err) throw err const video = res.body.data[0] - expect(video.magnetUri).to.match(/\.mp4/) + const magnetUri = video.files[0].magnetUri + expect(magnetUri).to.match(/\.mp4/) - webtorrent.add(video.magnetUri, function (torrent) { + webtorrent.add(magnetUri, function (torrent) { expect(torrent.files).to.exist expect(torrent.files.length).to.equal(1) expect(torrent.files[0].path).match(/\.mp4$/)