test(channels): +admin update another users channel
This commit is contained in:
parent
2a8b94b4e4
commit
3a8fe5a2ab
2 changed files with 29 additions and 1 deletions
|
@ -33,6 +33,7 @@ describe('Test video channels', function () {
|
|||
let totoChannel: number
|
||||
let videoUUID: string
|
||||
let accountName: string
|
||||
let secondUserChannelName: string
|
||||
|
||||
const avatarPaths: { [ port: number ]: string } = {}
|
||||
const bannerPaths: { [ port: number ]: string } = {}
|
||||
|
@ -219,6 +220,32 @@ describe('Test video channels', function () {
|
|||
}
|
||||
})
|
||||
|
||||
it('Should update another accounts video channel', async function () {
|
||||
this.timeout(15000)
|
||||
const result = await servers[0].users.generate('second_user')
|
||||
secondUserChannelName = result.userChannelName
|
||||
|
||||
const videoChannelAttributes = {
|
||||
displayName: 'video channel updated',
|
||||
description: 'video channel description updated',
|
||||
support: 'support updated'
|
||||
}
|
||||
|
||||
await servers[0].channels.update({ channelName: secondUserChannelName, attributes: videoChannelAttributes })
|
||||
|
||||
await waitJobs(servers)
|
||||
})
|
||||
|
||||
it('Should have another acccounts video channel updated', async function () {
|
||||
for (const server of servers) {
|
||||
const body = await server.channels.get({ channelName: secondUserChannelName })
|
||||
|
||||
expect(body.displayName).to.equal('video channel updated')
|
||||
expect(body.description).to.equal('video channel description updated')
|
||||
expect(body.support).to.equal('support updated')
|
||||
}
|
||||
})
|
||||
|
||||
it('Should update the channel support field and update videos too', async function () {
|
||||
this.timeout(35000)
|
||||
|
||||
|
|
|
@ -202,7 +202,8 @@ export class UsersCommand extends AbstractCommand {
|
|||
return {
|
||||
token,
|
||||
userId: user.id,
|
||||
userChannelId: me.videoChannels[0].id
|
||||
userChannelId: me.videoChannels[0].id,
|
||||
userChannelName: me.videoChannels[0].name
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue