import 'mocha'
import {
- addVideoChannel,
addVideoCommentThread,
cleanupTests,
createUser,
flushAndRunServer,
getVideo,
- getVideoChannelsList,
getVideosList,
killallServers,
makeActivityPubGetRequest,
displayName: 'second video channel',
description: 'super video channel description'
}
- await addVideoChannel(server.url, server.accessToken, videoChannel)
+ await server.channelsCommand.create({ attributes: videoChannel })
// Create comments
const text = 'my super first comment'
})
it('Should have updated video channels url', async function () {
- const res = await getVideoChannelsList(server.url, 0, 5, '-name')
- expect(res.body.total).to.equal(3)
+ const { data, total } = await server.channelsCommand.list({ sort: '-name' })
+ expect(total).to.equal(3)
- for (const channel of res.body.data) {
+ for (const channel of data) {
const { body } = await makeActivityPubGetRequest(server.url, '/video-channels/' + channel.name)
expect(body.id).to.equal('http://localhost:9002/video-channels/' + channel.name)