aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/check-params/video-channels.ts6
-rw-r--r--server/tests/api/check-params/videos.ts16
2 files changed, 16 insertions, 6 deletions
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts
index b46b90c14..08d1af52e 100644
--- a/server/tests/api/check-params/video-channels.ts
+++ b/server/tests/api/check-params/video-channels.ts
@@ -119,6 +119,9 @@ describe('Test videos API validator', function () {
119 it('Should fail with a long name', async function () { 119 it('Should fail with a long name', async function () {
120 const fields = { 120 const fields = {
121 name: 'hello tooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' + 121 name: 'hello tooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' +
122 'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' +
123 'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' +
124 'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' +
122 'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo long', 125 'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo long',
123 description: 'super description' 126 description: 'super description'
124 } 127 }
@@ -178,6 +181,9 @@ describe('Test videos API validator', function () {
178 it('Should fail with a long name', async function () { 181 it('Should fail with a long name', async function () {
179 const fields = { 182 const fields = {
180 name: 'hello tooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' + 183 name: 'hello tooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' +
184 'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' +
185 'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' +
186 'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo' +
181 'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo long', 187 'oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo long',
182 description: 'super description' 188 description: 'super description'
183 } 189 }
diff --git a/server/tests/api/check-params/videos.ts b/server/tests/api/check-params/videos.ts
index 167b45b61..765b9c16e 100644
--- a/server/tests/api/check-params/videos.ts
+++ b/server/tests/api/check-params/videos.ts
@@ -124,7 +124,9 @@ describe('Test videos API validator', function () {
124 124
125 it('Should fail with a long name', async function () { 125 it('Should fail with a long name', async function () {
126 const fields = { 126 const fields = {
127 name: 'My very very very very very very very very very very very very very very very very long name', 127 name: 'My very very very very very very very very very very very very very very very very very ' +
128 'very very very very very very very very very very very very very very very very long long' +
129 'very very very very very very very very very very very very very very very very long name',
128 category: 5, 130 category: 5,
129 licence: 1, 131 licence: 1,
130 language: 6, 132 language: 6,
@@ -358,7 +360,7 @@ describe('Test videos API validator', function () {
358 language: 6, 360 language: 6,
359 nsfw: false, 361 nsfw: false,
360 description: 'my super description', 362 description: 'my super description',
361 tags: [ 'tag1', 'tag2', 'tag3', 'tag4' ], 363 tags: [ 'tag1', 'tag2', 'tag3', 'tag4', 'tag5', 'tag6' ],
362 channelId 364 channelId
363 } 365 }
364 const attaches = { 366 const attaches = {
@@ -392,7 +394,7 @@ describe('Test videos API validator', function () {
392 language: 6, 394 language: 6,
393 nsfw: false, 395 nsfw: false,
394 description: 'my super description', 396 description: 'my super description',
395 tags: [ 'my_super_tag_too_long', 'tag1' ], 397 tags: [ 'my_super_tag_too_long_long_long_long_long_long', 'tag1' ],
396 channelId 398 channelId
397 } 399 }
398 const attaches = { 400 const attaches = {
@@ -543,7 +545,9 @@ describe('Test videos API validator', function () {
543 545
544 it('Should fail with a long name', async function () { 546 it('Should fail with a long name', async function () {
545 const fields = { 547 const fields = {
546 name: 'My very very very very very very very very very very very very very very very very long name', 548 name: 'My very very very very very very very very very very very very very very very very very ' +
549 'very very very very very very very very very very very very very very very very long long' +
550 'very very very very very very very very very very very very very very very very long name',
547 category: 5, 551 category: 5,
548 licence: 2, 552 licence: 2,
549 language: 6, 553 language: 6,
@@ -629,7 +633,7 @@ describe('Test videos API validator', function () {
629 language: 6, 633 language: 6,
630 nsfw: false, 634 nsfw: false,
631 description: 'my super description', 635 description: 'my super description',
632 tags: [ 'tag1', 'tag2', 'tag3', 'tag4' ] 636 tags: [ 'tag1', 'tag2', 'tag3', 'tag4', 'tag5', 'tag6' ]
633 } 637 }
634 await makePutBodyRequest({ url: server.url, path: path + videoId, token: server.accessToken, fields }) 638 await makePutBodyRequest({ url: server.url, path: path + videoId, token: server.accessToken, fields })
635 }) 639 })
@@ -655,7 +659,7 @@ describe('Test videos API validator', function () {
655 language: 6, 659 language: 6,
656 nsfw: false, 660 nsfw: false,
657 description: 'my super description', 661 description: 'my super description',
658 tags: [ 'my_super_tag_too_long', 'tag1' ] 662 tags: [ 'my_super_tag_too_long_long_long_long', 'tag1' ]
659 } 663 }
660 await makePutBodyRequest({ url: server.url, path: path + videoId, token: server.accessToken, fields }) 664 await makePutBodyRequest({ url: server.url, path: path + videoId, token: server.accessToken, fields })
661 }) 665 })