aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/video-channels.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params/video-channels.ts')
-rw-r--r--server/tests/api/check-params/video-channels.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts
index ff04f6b03..de88298d1 100644
--- a/server/tests/api/check-params/video-channels.ts
+++ b/server/tests/api/check-params/video-channels.ts
@@ -24,6 +24,7 @@ import {
24 checkBadStartPagination 24 checkBadStartPagination
25} from '../../../../shared/extra-utils/requests/check-api-params' 25} from '../../../../shared/extra-utils/requests/check-api-params'
26import { join } from 'path' 26import { join } from 'path'
27import { VideoChannelUpdate } from '../../../../shared/models/videos'
27 28
28const expect = chai.expect 29const expect = chai.expect
29 30
@@ -169,9 +170,11 @@ describe('Test video channels API validator', function () {
169 }) 170 })
170 171
171 describe('When updating a video channel', function () { 172 describe('When updating a video channel', function () {
172 const baseCorrectParams = { 173 const baseCorrectParams: VideoChannelUpdate = {
173 displayName: 'hello', 174 displayName: 'hello',
174 description: 'super description' 175 description: 'super description',
176 support: 'toto',
177 bulkVideosSupportUpdate: false
175 } 178 }
176 let path: string 179 let path: string
177 180
@@ -214,6 +217,11 @@ describe('Test video channels API validator', function () {
214 await makePutBodyRequest({ url: server.url, path, token: server.accessToken, fields }) 217 await makePutBodyRequest({ url: server.url, path, token: server.accessToken, fields })
215 }) 218 })
216 219
220 it('Should fail with a bad bulkVideosSupportUpdate field', async function () {
221 const fields = immutableAssign(baseCorrectParams, { bulkVideosSupportUpdate: 'super' })
222 await makePutBodyRequest({ url: server.url, path, token: server.accessToken, fields })
223 })
224
217 it('Should succeed with the correct parameters', async function () { 225 it('Should succeed with the correct parameters', async function () {
218 await makePutBodyRequest({ 226 await makePutBodyRequest({
219 url: server.url, 227 url: server.url,