1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Add video channel tests

This commit is contained in:
Chocobozzz 2017-10-24 19:41:30 +02:00
parent 72c7248b6f
commit 5f04dd2f74
No known key found for this signature in database
GPG key ID: 583A612D890159BE
16 changed files with 869 additions and 114 deletions

View file

@ -13,7 +13,8 @@ import {
setAccessTokensToServers,
flushAndRunMultipleServers,
killallServers,
webtorrentAdd
webtorrentAdd,
getVideo
} from '../utils'
describe('Test video transcoding', function () {
@ -42,9 +43,12 @@ describe('Test video transcoding', function () {
const res = await getVideosList(servers[0].url)
const video = res.body.data[0]
expect(video.files).to.have.lengthOf(1)
const magnetUri = video.files[0].magnetUri
const res2 = await getVideo(servers[0].url, video.id)
const videoDetails = res2.body
expect(videoDetails.files).to.have.lengthOf(1)
const magnetUri = videoDetails.files[0].magnetUri
expect(magnetUri).to.match(/\.webm/)
const torrent = await webtorrentAdd(magnetUri)
@ -68,9 +72,12 @@ describe('Test video transcoding', function () {
const res = await getVideosList(servers[1].url)
const video = res.body.data[0]
expect(video.files).to.have.lengthOf(4)
const res2 = await getVideo(servers[1].url, video.id)
const videoDetails = res2.body
const magnetUri = video.files[0].magnetUri
expect(videoDetails.files).to.have.lengthOf(4)
const magnetUri = videoDetails.files[0].magnetUri
expect(magnetUri).to.match(/\.mp4/)
const torrent = await webtorrentAdd(magnetUri)