]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/users/users.ts
Introduce comments command
[github/Chocobozzz/PeerTube.git] / server / tests / api / users / users.ts
index 4b9056306bc53bab21d124ab2da81f48903b0b38..4d255f3409de4a7487442907ca8d20146246bc20 100644 (file)
@@ -4,7 +4,6 @@ import 'mocha'
 import * as chai from 'chai'
 import { HttpStatusCode } from '@shared/core-utils'
 import {
-  addVideoCommentThread,
   blockUser,
   cleanupTests,
   closeAllSequelize,
@@ -18,7 +17,6 @@ import {
   getUserInformation,
   getUsersList,
   getUsersListPaginationAndSort,
-  getVideoChannel,
   getVideosList,
   killallServers,
   login,
@@ -864,9 +862,9 @@ describe('Test users', function () {
     })
 
     it('Should have created the channel', async function () {
-      const res = await getVideoChannel(server.url, 'my_user_15_channel')
+      const { displayName } = await server.channelsCommand.get({ channelName: 'my_user_15_channel' })
 
-      expect(res.body.displayName).to.equal('my channel rocks')
+      expect(displayName).to.equal('my channel rocks')
     })
 
     it('Should remove me', async function () {
@@ -984,7 +982,7 @@ describe('Test users', function () {
 
     it('Should report correct video comments for user', async function () {
       const text = 'super comment'
-      await addVideoCommentThread(server.url, user17AccessToken, videoId, text)
+      await server.commentsCommand.createThread({ token: user17AccessToken, videoId, text })
 
       const res = await getUserInformation(server.url, server.accessToken, user17Id, true)
       const user: User = res.body