From bb4ba6d94c5051fdd665ebe63fffcc105778b8be Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 3 Dec 2020 14:10:54 +0100 Subject: Add permanent live support --- server/tests/api/check-params/live.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'server/tests/api/check-params') diff --git a/server/tests/api/check-params/live.ts b/server/tests/api/check-params/live.ts index 2b2d1beec..055f2f295 100644 --- a/server/tests/api/check-params/live.ts +++ b/server/tests/api/check-params/live.ts @@ -84,7 +84,8 @@ describe('Test video lives API validator', function () { tags: [ 'tag1', 'tag2' ], privacy: VideoPrivacy.PUBLIC, channelId, - saveReplay: false + saveReplay: false, + permanentLive: false } }) @@ -211,6 +212,12 @@ describe('Test video lives API validator', function () { await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) }) + it('Should fail with save replay and permanent live set to true', async function () { + const fields = immutableAssign(baseCorrectParams, { saveReplay: true, permanentLive: true }) + + await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields }) + }) + it('Should succeed with the correct parameters', async function () { this.timeout(30000) @@ -372,6 +379,12 @@ describe('Test video lives API validator', function () { await updateLive(server.url, server.accessToken, videoIdNotLive, {}, 404) }) + it('Should fail with save replay and permanent live set to true', async function () { + const fields = { saveReplay: true, permanentLive: true } + + await updateLive(server.url, server.accessToken, videoId, fields, 400) + }) + it('Should succeed with the correct params', async function () { await updateLive(server.url, server.accessToken, videoId, { saveReplay: false }) }) -- cgit v1.2.3