From 9639bd175726b73f8fe664b5ced12a72407b1f0b Mon Sep 17 00:00:00 2001 From: buoyantair Date: Mon, 29 Oct 2018 22:18:31 +0530 Subject: Move utils to /shared Move utils used by /server/tools/* & /server/tests/**/* into /shared folder. Issue: #1336 --- server/tests/api/check-params/video-abuses.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'server/tests/api/check-params/video-abuses.ts') diff --git a/server/tests/api/check-params/video-abuses.ts b/server/tests/api/check-params/video-abuses.ts index d2bed6a2a..a79ab4201 100644 --- a/server/tests/api/check-params/video-abuses.ts +++ b/server/tests/api/check-params/video-abuses.ts @@ -15,8 +15,12 @@ import { updateVideoAbuse, uploadVideo, userLogin -} from '../../utils' -import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params' +} from '../../../../shared/utils' +import { + checkBadCountPagination, + checkBadSortPagination, + checkBadStartPagination +} from '../../../../shared/utils/requests/check-api-params' import { VideoAbuseState } from '../../../../shared/models/videos' describe('Test video abuses API validators', function () { -- cgit v1.2.3 From 1506307f2f903ce0f80155072a33345c702b7c76 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 14 Jan 2019 16:48:38 +0100 Subject: Increase abuse length to 3000 And correctly handle new lines --- server/tests/api/check-params/video-abuses.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/tests/api/check-params/video-abuses.ts') 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 () { await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields }) }) - it('Should fail with a reason too big', async function () { - const fields = { reason: 'super'.repeat(61) } + it('Should fail with a too big reason', async function () { + const fields = { reason: 'super'.repeat(605) } await makePostBodyRequest({ url: server.url, path, token: server.accessToken, fields }) }) @@ -154,7 +154,7 @@ describe('Test video abuses API validators', function () { }) it('Should fail with a bad moderation comment', async function () { - const body = { moderationComment: 'b'.repeat(305) } + const body = { moderationComment: 'b'.repeat(3001) } await updateVideoAbuse(server.url, server.accessToken, server.video.uuid, videoAbuseId, body, 400) }) -- cgit v1.2.3