]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/users.ts
Fix CLI tools
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / users.ts
index 70a872ce57f17ac9a92bbf322959f26a8d3edf72..88fc8e8b168557b7a1bef448233fc30b3c99cbc4 100644 (file)
@@ -5,7 +5,6 @@ import { omit } from 'lodash'
 import { User, UserRole, VideoCreateResult } from '../../../../shared'
 import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
 import {
-  addVideoChannel,
   blockUser,
   buildAbsoluteFixturePath,
   cleanupTests,
@@ -32,7 +31,7 @@ import {
   uploadVideo,
   userLogin
 } from '../../../../shared/extra-utils'
-import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
+import { MockSmtpServer } from '../../../../shared/extra-utils/mock-servers/mock-email'
 import {
   checkBadCountPagination,
   checkBadSortPagination,
@@ -1041,8 +1040,8 @@ describe('Test users API validators', function () {
     })
 
     it('Should fail with an existing channel', async function () {
-      const videoChannelAttributesArg = { name: 'existing_channel', displayName: 'hello', description: 'super description' }
-      await addVideoChannel(server.url, server.accessToken, videoChannelAttributesArg)
+      const attributes = { name: 'existing_channel', displayName: 'hello', description: 'super description' }
+      await server.channelsCommand.create({ attributes })
 
       const fields = immutableAssign(baseCorrectParams, { channel: { name: 'existing_channel', displayName: 'toto' } })