From a96aed15188174c50885dda0df3164a67295e11f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 19 Oct 2017 14:58:28 +0200 Subject: Add ability to download a video from direct link or torrent file --- server/tests/api/multiple-pods.ts | 2 ++ server/tests/api/single-pod.ts | 2 ++ 2 files changed, 4 insertions(+) (limited to 'server/tests/api') 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 () { const file = video.files[0] const magnetUri = file.magnetUri expect(file.magnetUri).to.have.lengthOf.above(2) + expect(file.torrentUrl).to.equal(`http://${video.podHost}/static/torrents/${video.uuid}-${file.resolution}.torrent`) + expect(file.fileUrl).to.equal(`http://${video.podHost}/static/webseed/${video.uuid}-${file.resolution}.webm`) expect(file.resolution).to.equal(720) expect(file.resolutionLabel).to.equal('720p') 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 () { const file = video.files[0] const magnetUri = file.magnetUri expect(file.magnetUri).to.have.lengthOf.above(2) + expect(file.torrentUrl).to.equal(`${server.url}/static/torrents/${video.uuid}-${file.resolution}.torrent`) + expect(file.fileUrl).to.equal(`${server.url}/static/webseed/${video.uuid}-${file.resolution}.webm`) expect(file.resolution).to.equal(720) expect(file.resolutionLabel).to.equal('720p') expect(file.size).to.equal(218910) -- cgit v1.2.3