aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-03-26 09:48:10 +0200
committerChocobozzz <me@florianbigard.com>2018-03-26 09:48:20 +0200
commit53eb90c0ab584ee48774e15ee7c0e764cfe4559d (patch)
tree9eba75b6026f65b22083d9e3c15634074e924880
parentae09ed2c6a4d22262b02870905d16211994662b6 (diff)
downloadPeerTube-53eb90c0ab584ee48774e15ee7c0e764cfe4559d.tar.gz
PeerTube-53eb90c0ab584ee48774e15ee7c0e764cfe4559d.tar.zst
PeerTube-53eb90c0ab584ee48774e15ee7c0e764cfe4559d.zip
Fix check comments params unit tests
-rw-r--r--client/src/app/shared/forms/form-validators/video-comment.ts2
-rw-r--r--server/tests/api/check-params/video-comments.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/shared/forms/form-validators/video-comment.ts b/client/src/app/shared/forms/form-validators/video-comment.ts
index 42a97e300..290d83195 100644
--- a/client/src/app/shared/forms/form-validators/video-comment.ts
+++ b/client/src/app/shared/forms/form-validators/video-comment.ts
@@ -1,7 +1,7 @@
1import { Validators } from '@angular/forms' 1import { Validators } from '@angular/forms'
2 2
3export const VIDEO_COMMENT_TEXT = { 3export const VIDEO_COMMENT_TEXT = {
4 VALIDATORS: [ Validators.required, Validators.minLength(2), Validators.maxLength(3000) ], 4 VALIDATORS: [ Validators.required, Validators.minLength(1), Validators.maxLength(3000) ],
5 MESSAGES: { 5 MESSAGES: {
6 'required': 'Comment is required.', 6 'required': 'Comment is required.',
7 'minlength': 'Comment must be at least 2 characters long.', 7 'minlength': 'Comment must be at least 2 characters long.',
diff --git a/server/tests/api/check-params/video-comments.ts b/server/tests/api/check-params/video-comments.ts
index 3fde9bd94..5241832fe 100644
--- a/server/tests/api/check-params/video-comments.ts
+++ b/server/tests/api/check-params/video-comments.ts
@@ -117,7 +117,7 @@ describe('Test video comments API validator', function () {
117 117
118 it('Should fail with a short comment', async function () { 118 it('Should fail with a short comment', async function () {
119 const fields = { 119 const fields = {
120 text: 'h'.repeat(3001) 120 text: ''
121 } 121 }
122 await makePostBodyRequest({ url: server.url, path: pathThread, token: server.accessToken, fields }) 122 await makePostBodyRequest({ url: server.url, path: pathThread, token: server.accessToken, fields })
123 }) 123 })
@@ -160,7 +160,7 @@ describe('Test video comments API validator', function () {
160 160
161 it('Should fail with a short comment', async function () { 161 it('Should fail with a short comment', async function () {
162 const fields = { 162 const fields = {
163 text: 'h'.repeat(3001) 163 text: ''
164 } 164 }
165 await makePostBodyRequest({ url: server.url, path: pathComment, token: server.accessToken, fields }) 165 await makePostBodyRequest({ url: server.url, path: pathComment, token: server.accessToken, fields })
166 }) 166 })