aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/video-transcoder.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/video-transcoder.ts')
-rw-r--r--server/tests/api/video-transcoder.ts17
1 files changed, 12 insertions, 5 deletions
diff --git a/server/tests/api/video-transcoder.ts b/server/tests/api/video-transcoder.ts
index 22d89724b..cafcc037d 100644
--- a/server/tests/api/video-transcoder.ts
+++ b/server/tests/api/video-transcoder.ts
@@ -13,7 +13,8 @@ import {
13 setAccessTokensToServers, 13 setAccessTokensToServers,
14 flushAndRunMultipleServers, 14 flushAndRunMultipleServers,
15 killallServers, 15 killallServers,
16 webtorrentAdd 16 webtorrentAdd,
17 getVideo
17} from '../utils' 18} from '../utils'
18 19
19describe('Test video transcoding', function () { 20describe('Test video transcoding', function () {
@@ -42,9 +43,12 @@ describe('Test video transcoding', function () {
42 43
43 const res = await getVideosList(servers[0].url) 44 const res = await getVideosList(servers[0].url)
44 const video = res.body.data[0] 45 const video = res.body.data[0]
45 expect(video.files).to.have.lengthOf(1)
46 46
47 const magnetUri = video.files[0].magnetUri 47 const res2 = await getVideo(servers[0].url, video.id)
48 const videoDetails = res2.body
49 expect(videoDetails.files).to.have.lengthOf(1)
50
51 const magnetUri = videoDetails.files[0].magnetUri
48 expect(magnetUri).to.match(/\.webm/) 52 expect(magnetUri).to.match(/\.webm/)
49 53
50 const torrent = await webtorrentAdd(magnetUri) 54 const torrent = await webtorrentAdd(magnetUri)
@@ -68,9 +72,12 @@ describe('Test video transcoding', function () {
68 const res = await getVideosList(servers[1].url) 72 const res = await getVideosList(servers[1].url)
69 73
70 const video = res.body.data[0] 74 const video = res.body.data[0]
71 expect(video.files).to.have.lengthOf(4) 75 const res2 = await getVideo(servers[1].url, video.id)
76 const videoDetails = res2.body
77
78 expect(videoDetails.files).to.have.lengthOf(4)
72 79
73 const magnetUri = video.files[0].magnetUri 80 const magnetUri = videoDetails.files[0].magnetUri
74 expect(magnetUri).to.match(/\.mp4/) 81 expect(magnetUri).to.match(/\.mp4/)
75 82
76 const torrent = await webtorrentAdd(magnetUri) 83 const torrent = await webtorrentAdd(magnetUri)