aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-10-19 14:58:28 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-10-19 14:58:28 +0200
commita96aed15188174c50885dda0df3164a67295e11f (patch)
tree7e3941324614e52a2f6ab7755224ab8ae8f8c19f /server/tests
parentbda65bdc9f3ce7d4b6e97cb9afaca25b71added3 (diff)
downloadPeerTube-a96aed15188174c50885dda0df3164a67295e11f.tar.gz
PeerTube-a96aed15188174c50885dda0df3164a67295e11f.tar.zst
PeerTube-a96aed15188174c50885dda0df3164a67295e11f.zip
Add ability to download a video from direct link or torrent file
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/multiple-pods.ts2
-rw-r--r--server/tests/api/single-pod.ts2
2 files changed, 4 insertions, 0 deletions
diff --git a/server/tests/api/multiple-pods.ts b/server/tests/api/multiple-pods.ts
index 6c11aace5..e0ccb3058 100644
--- a/server/tests/api/multiple-pods.ts
+++ b/server/tests/api/multiple-pods.ts
@@ -106,6 +106,8 @@ describe('Test multiple pods', function () {
106 const file = video.files[0] 106 const file = video.files[0]
107 const magnetUri = file.magnetUri 107 const magnetUri = file.magnetUri
108 expect(file.magnetUri).to.have.lengthOf.above(2) 108 expect(file.magnetUri).to.have.lengthOf.above(2)
109 expect(file.torrentUrl).to.equal(`http://${video.podHost}/static/torrents/${video.uuid}-${file.resolution}.torrent`)
110 expect(file.fileUrl).to.equal(`http://${video.podHost}/static/webseed/${video.uuid}-${file.resolution}.webm`)
109 expect(file.resolution).to.equal(720) 111 expect(file.resolution).to.equal(720)
110 expect(file.resolutionLabel).to.equal('720p') 112 expect(file.resolutionLabel).to.equal('720p')
111 expect(file.size).to.equal(572456) 113 expect(file.size).to.equal(572456)
diff --git a/server/tests/api/single-pod.ts b/server/tests/api/single-pod.ts
index 82bc51a3e..71017b2b3 100644
--- a/server/tests/api/single-pod.ts
+++ b/server/tests/api/single-pod.ts
@@ -127,6 +127,8 @@ describe('Test a single pod', function () {
127 const file = video.files[0] 127 const file = video.files[0]
128 const magnetUri = file.magnetUri 128 const magnetUri = file.magnetUri
129 expect(file.magnetUri).to.have.lengthOf.above(2) 129 expect(file.magnetUri).to.have.lengthOf.above(2)
130 expect(file.torrentUrl).to.equal(`${server.url}/static/torrents/${video.uuid}-${file.resolution}.torrent`)
131 expect(file.fileUrl).to.equal(`${server.url}/static/webseed/${video.uuid}-${file.resolution}.webm`)
130 expect(file.resolution).to.equal(720) 132 expect(file.resolution).to.equal(720)
131 expect(file.resolutionLabel).to.equal('720p') 133 expect(file.resolutionLabel).to.equal('720p')
132 expect(file.size).to.equal(218910) 134 expect(file.size).to.equal(218910)