test(channels): +admin update another users channel
This commit is contained in:
parent
2a8b94b4e4
commit
3a8fe5a2ab
|
@ -33,6 +33,7 @@ describe('Test video channels', function () {
|
||||||
let totoChannel: number
|
let totoChannel: number
|
||||||
let videoUUID: string
|
let videoUUID: string
|
||||||
let accountName: string
|
let accountName: string
|
||||||
|
let secondUserChannelName: string
|
||||||
|
|
||||||
const avatarPaths: { [ port: number ]: string } = {}
|
const avatarPaths: { [ port: number ]: string } = {}
|
||||||
const bannerPaths: { [ 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 () {
|
it('Should update the channel support field and update videos too', async function () {
|
||||||
this.timeout(35000)
|
this.timeout(35000)
|
||||||
|
|
||||||
|
|
|
@ -202,7 +202,8 @@ export class UsersCommand extends AbstractCommand {
|
||||||
return {
|
return {
|
||||||
token,
|
token,
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
userChannelId: me.videoChannels[0].id
|
userChannelId: me.videoChannels[0].id,
|
||||||
|
userChannelName: me.videoChannels[0].name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user