]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/users.ts
Introduce channels command
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / users.ts
index da0f55bf8174f93024cb66cc4543f94b778e2afc..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,
@@ -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' } })