aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r--server/tests/api/check-params/live.ts15
1 files changed, 14 insertions, 1 deletions
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 () {
84 tags: [ 'tag1', 'tag2' ], 84 tags: [ 'tag1', 'tag2' ],
85 privacy: VideoPrivacy.PUBLIC, 85 privacy: VideoPrivacy.PUBLIC,
86 channelId, 86 channelId,
87 saveReplay: false 87 saveReplay: false,
88 permanentLive: false
88 } 89 }
89 }) 90 })
90 91
@@ -211,6 +212,12 @@ describe('Test video lives API validator', function () {
211 await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) 212 await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches })
212 }) 213 })
213 214
215 it('Should fail with save replay and permanent live set to true', async function () {
216 const fields = immutableAssign(baseCorrectParams, { saveReplay: true, permanentLive: true })
217
218 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
219 })
220
214 it('Should succeed with the correct parameters', async function () { 221 it('Should succeed with the correct parameters', async function () {
215 this.timeout(30000) 222 this.timeout(30000)
216 223
@@ -372,6 +379,12 @@ describe('Test video lives API validator', function () {
372 await updateLive(server.url, server.accessToken, videoIdNotLive, {}, 404) 379 await updateLive(server.url, server.accessToken, videoIdNotLive, {}, 404)
373 }) 380 })
374 381
382 it('Should fail with save replay and permanent live set to true', async function () {
383 const fields = { saveReplay: true, permanentLive: true }
384
385 await updateLive(server.url, server.accessToken, videoId, fields, 400)
386 })
387
375 it('Should succeed with the correct params', async function () { 388 it('Should succeed with the correct params', async function () {
376 await updateLive(server.url, server.accessToken, videoId, { saveReplay: false }) 389 await updateLive(server.url, server.accessToken, videoId, { saveReplay: false })
377 }) 390 })