ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix check comments params unit tests
Chocobozzz53eb90c0ab58
diff --git a/client/src/app/shared/forms/form-validators/video-comment.ts b/client/src/app/shared/forms/form-validators/video-comment.tsindex 42a97e3005..290d83195b 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 @@import { Validators } from '@angular/forms'export const VIDEO_COMMENT_TEXT = {- VALIDATORS: [ Validators.required, Validators.minLength(2), Validators.maxLength(3000) ],+ VALIDATORS: [ Validators.required, Validators.minLength(1), Validators.maxLength(3000) ],MESSAGES: {'required': 'Comment is required.','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.tsindex 3fde9bd947..5241832fea 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 () {it('Should fail with a short comment', async function () {const fields = {- text: 'h'.repeat(3001)+ text: ''}await makePostBodyRequest({ url: server.url, path: pathThread, token: server.accessToken, fields })})@@ -160,7 +160,7 @@ describe('Test video comments API validator', function () {it('Should fail with a short comment', async function () {const fields = {- text: 'h'.repeat(3001)+ text: ''}await makePostBodyRequest({ url: server.url, path: pathComment, token: server.accessToken, fields })})