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.ts15
1 files changed, 13 insertions, 2 deletions
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts
index d073e28f0..43c5462ee 100644
--- a/server/tests/api/check-params/video-channels.ts
+++ b/server/tests/api/check-params/video-channels.ts
@@ -62,7 +62,8 @@ describe('Test videos API validator', function () {
62 describe('When adding a video channel', function () { 62 describe('When adding a video channel', function () {
63 const baseCorrectParams = { 63 const baseCorrectParams = {
64 name: 'hello', 64 name: 'hello',
65 description: 'super description' 65 description: 'super description',
66 support: 'super support text'
66 } 67 }
67 68
68 it('Should fail with a non authenticated user', async function () { 69 it('Should fail with a non authenticated user', async function () {
@@ -89,13 +90,18 @@ describe('Test videos API validator', function () {
89 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields }) 90 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
90 }) 91 })
91 92
93 it('Should fail with a long support text', async function () {
94 const fields = immutableAssign(baseCorrectParams, { support: 'super'.repeat(70) })
95 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
96 })
97
92 it('Should succeed with the correct parameters', async function () { 98 it('Should succeed with the correct parameters', async function () {
93 await makePostBodyRequest({ 99 await makePostBodyRequest({
94 url: server.url, 100 url: server.url,
95 path, 101 path,
96 token: server.accessToken, 102 token: server.accessToken,
97 fields: baseCorrectParams, 103 fields: baseCorrectParams,
98 statusCodeExpected: 204 104 statusCodeExpected: 200
99 }) 105 })
100 }) 106 })
101 }) 107 })
@@ -143,6 +149,11 @@ describe('Test videos API validator', function () {
143 await makePutBodyRequest({ url: server.url, path: path + '/' + videoChannelId, token: server.accessToken, fields }) 149 await makePutBodyRequest({ url: server.url, path: path + '/' + videoChannelId, token: server.accessToken, fields })
144 }) 150 })
145 151
152 it('Should fail with a long support text', async function () {
153 const fields = immutableAssign(baseCorrectParams, { support: 'super'.repeat(70) })
154 await makePutBodyRequest({ url: server.url, path: path + '/' + videoChannelId, token: server.accessToken, fields })
155 })
156
146 it('Should succeed with the correct parameters', async function () { 157 it('Should succeed with the correct parameters', async function () {
147 await makePutBodyRequest({ 158 await makePutBodyRequest({
148 url: server.url, 159 url: server.url,