aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/check-params/videos.ts')
-rw-r--r--server/tests/api/check-params/videos.ts18
1 files changed, 16 insertions, 2 deletions
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts
index aa30b721b..1d5c8543d 100644
--- a/server/tests/api/check-params/videos.ts
+++ b/server/tests/api/check-params/videos.ts
@@ -102,6 +102,7 @@ describe('Test videos API validator', function () {
102 nsfw: false, 102 nsfw: false,
103 commentsEnabled: true, 103 commentsEnabled: true,
104 description: 'my super description', 104 description: 'my super description',
105 support: 'my super support text',
105 tags: [ 'tag1', 'tag2' ], 106 tags: [ 'tag1', 'tag2' ],
106 privacy: VideoPrivacy.PUBLIC, 107 privacy: VideoPrivacy.PUBLIC,
107 channelId 108 channelId
@@ -178,7 +179,14 @@ describe('Test videos API validator', function () {
178 }) 179 })
179 180
180 it('Should fail with a long description', async function () { 181 it('Should fail with a long description', async function () {
181 const fields = immutableAssign(baseCorrectParams, { description: 'super'.repeat(1500) }) 182 const fields = immutableAssign(baseCorrectParams, { description: 'super'.repeat(2500) })
183 const attaches = baseCorrectAttaches
184
185 await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
186 })
187
188 it('Should fail with a long support text', async function () {
189 const fields = immutableAssign(baseCorrectParams, { support: 'super'.repeat(70) })
182 const attaches = baseCorrectAttaches 190 const attaches = baseCorrectAttaches
183 191
184 await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches }) 192 await makeUploadRequest({ url: server.url, path: path + '/upload', token: server.accessToken, fields, attaches })
@@ -417,7 +425,13 @@ describe('Test videos API validator', function () {
417 }) 425 })
418 426
419 it('Should fail with a long description', async function () { 427 it('Should fail with a long description', async function () {
420 const fields = immutableAssign(baseCorrectParams, { description: 'super'.repeat(1500) }) 428 const fields = immutableAssign(baseCorrectParams, { description: 'super'.repeat(2500) })
429
430 await makePutBodyRequest({ url: server.url, path: path + videoId, token: server.accessToken, fields })
431 })
432
433 it('Should fail with a long support text', async function () {
434 const fields = immutableAssign(baseCorrectParams, { support: 'super'.repeat(70) })
421 435
422 await makePutBodyRequest({ url: server.url, path: path + videoId, token: server.accessToken, fields }) 436 await makePutBodyRequest({ url: server.url, path: path + videoId, token: server.accessToken, fields })
423 }) 437 })