diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts index c25754eb6..0d333badc 100644 --- a/server/tests/api/videos/video-channels.ts +++ b/server/tests/api/videos/video-channels.ts @@ -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) diff --git a/shared/extra-utils/users/users-command.ts b/shared/extra-utils/users/users-command.ts index 2a10e4fc8..90c5f2183 100644 --- a/shared/extra-utils/users/users-command.ts +++ b/shared/extra-utils/users/users-command.ts @@ -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 } }