]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/video-comments.ts
Add migrations
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / video-comments.ts
index 9190054da9fa70d6fa57139f7ce8bda23f509790..b80d91279992256756a9367acfa8b6c0950d42ec 100644 (file)
@@ -6,9 +6,13 @@ import {
   createUser,
   flushTests, killallServers, makeDeleteRequest, makeGetRequest, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers,
   uploadVideo, userLogin
-} from '../../utils'
-import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '../../utils/requests/check-api-params'
-import { addVideoCommentThread } from '../../utils/videos/video-comments'
+} from '../../../../shared/extra-utils'
+import {
+  checkBadCountPagination,
+  checkBadSortPagination,
+  checkBadStartPagination
+} from '../../../../shared/extra-utils/requests/check-api-params'
+import { addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments'
 
 const expect = chai.expect
 
@@ -23,7 +27,7 @@ describe('Test video comments API validator', function () {
   // ---------------------------------------------------------------
 
   before(async function () {
-    this.timeout(20000)
+    this.timeout(30000)
 
     await flushTests()
 
@@ -48,7 +52,7 @@ describe('Test video comments API validator', function () {
         username: 'user1',
         password: 'my super password'
       }
-      await createUser(server.url, server.accessToken, user.username, user.password)
+      await createUser({ url: server.url, accessToken: server.accessToken, username: user.username, password: user.password })
       userAccessToken = await userLogin(server, user)
     }
   })
@@ -117,7 +121,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 +164,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 })
     })