+ it('Should fail with a bad privacy for replay settings', async function () {
+ const fields = { saveReplay: true, replaySettings: { privacy: 5 } }
+
+ await command.update({ videoId: video.id, fields, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
+ })
+
+ it('Should fail with save replay enabled but without replay settings', async function () {
+ await server.config.updateCustomSubConfig({
+ newConfig: {
+ live: {
+ enabled: true,
+ allowReplay: true
+ }
+ }
+ })
+
+ const fields = { saveReplay: true }
+
+ await command.update({ videoId: video.id, fields, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
+ })
+
+ it('Should fail with save replay disabled and replay settings', async function () {
+ const fields = { saveReplay: false, replaySettings: { privacy: VideoPrivacy.INTERNAL } }
+
+ await command.update({ videoId: video.id, fields, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
+ })
+
+ it('Should fail with only replay settings when save replay is disabled', async function () {
+ const fields = { replaySettings: { privacy: VideoPrivacy.INTERNAL } }
+
+ await command.update({ videoId: video.id, fields, expectedStatus: HttpStatusCode.BAD_REQUEST_400 })
+ })
+