]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/users.ts
Check channel sync id is owned by channel
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / users.ts
index 84254945c339e068e2f4d8244daa1d735d556215..7acfd8c2cfffd6987cd22a8183b0ed2369311c13 100644 (file)
@@ -1,8 +1,6 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
-
-import 'mocha'
-import { omit } from 'lodash'
 import { MockSmtpServer } from '@server/tests/shared'
+import { omit } from '@shared/core-utils'
 import { HttpStatusCode, UserRole } from '@shared/models'
 import { cleanupTests, createSingleServer, makePostBodyRequest, PeerTubeServer, setAccessTokensToServers } from '@shared/server-commands'
 
@@ -57,7 +55,7 @@ describe('Test users API validators', function () {
     })
 
     it('Should fail with a missing email', async function () {
-      const fields = omit(baseCorrectParams, 'email')
+      const fields = omit(baseCorrectParams, [ 'email' ])
 
       await makePostBodyRequest({ url: server.url, path: registrationPath, token: server.accessToken, fields })
     })
@@ -163,7 +161,7 @@ describe('Test users API validators', function () {
         url: server.url,
         path: registrationPath,
         token: server.accessToken,
-        fields: fields,
+        fields,
         expectedStatus: HttpStatusCode.NO_CONTENT_204
       })
     })