From 7f4e7c36373217b8e92cf227c71999a0ce9a15d9 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 12 Jan 2017 09:47:21 +0100 Subject: Server: fix update remote video infohash --- server/tests/api/single-pod.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'server/tests/api/single-pod.js') diff --git a/server/tests/api/single-pod.js b/server/tests/api/single-pod.js index 29512dfc6..04b93fac7 100644 --- a/server/tests/api/single-pod.js +++ b/server/tests/api/single-pod.js @@ -96,7 +96,7 @@ describe('Test a single pod', function () { expect(torrent.files.length).to.equal(1) expect(torrent.files[0].path).to.exist.and.to.not.equal('') - done() + webtorrent.remove(video.magnetUri, done) }) }) }) @@ -515,6 +515,8 @@ describe('Test a single pod', function () { }) it('Should have the video updated', function (done) { + this.timeout(60000) + videosUtils.getVideo(server.url, videoId, function (err, res) { if (err) throw err @@ -529,7 +531,20 @@ describe('Test a single pod', function () { expect(miscsUtils.dateIsValid(video.createdAt)).to.be.true expect(miscsUtils.dateIsValid(video.updatedAt)).to.be.true - done() + videosUtils.testVideoImage(server.url, 'video_short3.webm', video.thumbnailPath, function (err, test) { + if (err) throw err + expect(test).to.equal(true) + + videoId = video.id + + webtorrent.add(video.magnetUri, function (torrent) { + expect(torrent.files).to.exist + expect(torrent.files.length).to.equal(1) + expect(torrent.files[0].path).to.exist.and.to.not.equal('') + + done() + }) + }) }) }) -- cgit v1.2.3