aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/single-pod.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-01-12 09:47:21 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-01-12 09:47:21 +0100
commit7f4e7c36373217b8e92cf227c71999a0ce9a15d9 (patch)
tree7c7f49d8066646a593c1d8a8551610dbed0f68aa /server/tests/api/single-pod.js
parent63d00f5ded0aad25eeb50111da65b6daa46bcb24 (diff)
downloadPeerTube-7f4e7c36373217b8e92cf227c71999a0ce9a15d9.tar.gz
PeerTube-7f4e7c36373217b8e92cf227c71999a0ce9a15d9.tar.zst
PeerTube-7f4e7c36373217b8e92cf227c71999a0ce9a15d9.zip
Server: fix update remote video infohash
Diffstat (limited to 'server/tests/api/single-pod.js')
-rw-r--r--server/tests/api/single-pod.js19
1 files changed, 17 insertions, 2 deletions
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 () {
96 expect(torrent.files.length).to.equal(1) 96 expect(torrent.files.length).to.equal(1)
97 expect(torrent.files[0].path).to.exist.and.to.not.equal('') 97 expect(torrent.files[0].path).to.exist.and.to.not.equal('')
98 98
99 done() 99 webtorrent.remove(video.magnetUri, done)
100 }) 100 })
101 }) 101 })
102 }) 102 })
@@ -515,6 +515,8 @@ describe('Test a single pod', function () {
515 }) 515 })
516 516
517 it('Should have the video updated', function (done) { 517 it('Should have the video updated', function (done) {
518 this.timeout(60000)
519
518 videosUtils.getVideo(server.url, videoId, function (err, res) { 520 videosUtils.getVideo(server.url, videoId, function (err, res) {
519 if (err) throw err 521 if (err) throw err
520 522
@@ -529,7 +531,20 @@ describe('Test a single pod', function () {
529 expect(miscsUtils.dateIsValid(video.createdAt)).to.be.true 531 expect(miscsUtils.dateIsValid(video.createdAt)).to.be.true
530 expect(miscsUtils.dateIsValid(video.updatedAt)).to.be.true 532 expect(miscsUtils.dateIsValid(video.updatedAt)).to.be.true
531 533
532 done() 534 videosUtils.testVideoImage(server.url, 'video_short3.webm', video.thumbnailPath, function (err, test) {
535 if (err) throw err
536 expect(test).to.equal(true)
537
538 videoId = video.id
539
540 webtorrent.add(video.magnetUri, function (torrent) {
541 expect(torrent.files).to.exist
542 expect(torrent.files.length).to.equal(1)
543 expect(torrent.files[0].path).to.exist.and.to.not.equal('')
544
545 done()
546 })
547 })
533 }) 548 })
534 }) 549 })
535 550