aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-01-14 16:48:38 +0100
committerChocobozzz <me@florianbigard.com>2019-01-14 16:48:38 +0100
commit1506307f2f903ce0f80155072a33345c702b7c76 (patch)
tree2bd9620c9ac49c1fc167bb09114f6a5fab049704 /server/tests/api/check-params
parent9a39392a7e6b3f180104856a4ea893e5baf86a02 (diff)
downloadPeerTube-1506307f2f903ce0f80155072a33345c702b7c76.tar.gz
PeerTube-1506307f2f903ce0f80155072a33345c702b7c76.tar.zst
PeerTube-1506307f2f903ce0f80155072a33345c702b7c76.zip
Increase abuse length to 3000
And correctly handle new lines
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r--server/tests/api/check-params/video-abuses.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/tests/api/check-params/video-abuses.ts b/server/tests/api/check-params/video-abuses.ts
index a79ab4201..3b8f5f14d 100644
--- a/server/tests/api/check-params/video-abuses.ts
+++ b/server/tests/api/check-params/video-abuses.ts
@@ -113,8 +113,8 @@ describe('Test video abuses API validators', function () {
113 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields }) 113 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
114 }) 114 })
115 115
116 it('Should fail with a reason too big', async function () { 116 it('Should fail with a too big reason', async function () {
117 const fields = { reason: 'super'.repeat(61) } 117 const fields = { reason: 'super'.repeat(605) }
118 118
119 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields }) 119 await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields })
120 }) 120 })
@@ -154,7 +154,7 @@ describe('Test video abuses API validators', function () {
154 }) 154 })
155 155
156 it('Should fail with a bad moderation comment', async function () { 156 it('Should fail with a bad moderation comment', async function () {
157 const body = { moderationComment: 'b'.repeat(305) } 157 const body = { moderationComment: 'b'.repeat(3001) }
158 await updateVideoAbuse(server.url, server.accessToken, server.video.uuid, videoAbuseId, body, 400) 158 await updateVideoAbuse(server.url, server.accessToken, server.video.uuid, videoAbuseId, body, 400)
159 }) 159 })
160 160