aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/videos.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-02-15 14:46:26 +0100
committerChocobozzz <me@florianbigard.com>2018-02-15 15:29:07 +0100
commit2422c46b27790d94fd29a7092170cee5a1b56008 (patch)
treed5c1942ce20cadb27a551d87c789edfe92f5b105 /server/tests/api/check-params/videos.ts
parent34cbef8c6cc912143a421413bdd832c4adcc556a (diff)
downloadPeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.tar.gz
PeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.tar.zst
PeerTube-2422c46b27790d94fd29a7092170cee5a1b56008.zip
Implement support field in video and video channel
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 })