diff options
author | Chocobozzz <me@florianbigard.com> | 2020-12-03 14:10:54 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-12-03 15:21:16 +0100 |
commit | bb4ba6d94c5051fdd665ebe63fffcc105778b8be (patch) | |
tree | d39302608c53e31395683bb5dd551eac6ced89f8 /server/tests/api/check-params/live.ts | |
parent | 19b7ebfaa822b12f6da25ad2ba10398b3ef25ec6 (diff) | |
download | PeerTube-bb4ba6d94c5051fdd665ebe63fffcc105778b8be.tar.gz PeerTube-bb4ba6d94c5051fdd665ebe63fffcc105778b8be.tar.zst PeerTube-bb4ba6d94c5051fdd665ebe63fffcc105778b8be.zip |
Add permanent live support
Diffstat (limited to 'server/tests/api/check-params/live.ts')
-rw-r--r-- | server/tests/api/check-params/live.ts | 15 |
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 | }) |