From 1ab6024345c8a4dd98588c55af9a218b77c8b714 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 16 Dec 2020 14:19:43 +0100 Subject: Fix live badge in videos list --- server/tests/api/live/live.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'server/tests/api/live/live.ts') diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts index 939285ae8..f6b6d7677 100644 --- a/server/tests/api/live/live.ts +++ b/server/tests/api/live/live.ts @@ -116,6 +116,8 @@ describe('Test live', function () { expect(video.channel.name).to.equal(servers[0].videoChannel.name) expect(video.channel.host).to.equal(servers[0].videoChannel.host) + expect(video.isLive).to.be.true + expect(video.nsfw).to.be.false expect(video.waitTranscoding).to.be.false expect(video.name).to.equal('my super live') @@ -269,6 +271,20 @@ describe('Test live', function () { await testFfmpegStreamError(command, false) }) + it('Should list this live now someone stream into it', async function () { + for (const server of servers) { + const res = await getVideosList(server.url) + + expect(res.body.total).to.equal(1) + expect(res.body.data).to.have.lengthOf(1) + + const video: Video = res.body.data[0] + + expect(video.name).to.equal('user live') + expect(video.isLive).to.be.true + } + }) + it('Should not allow a stream on a live that was blacklisted', async function () { this.timeout(30000) -- cgit v1.2.3