- const videoChannel = res.body
- expect(videoChannel.name).to.equal('second_video_channel')
- expect(videoChannel.displayName).to.equal('video channel updated')
- expect(videoChannel.description).to.equal('video channel description updated')
- expect(videoChannel.support).to.equal('video channel support text updated')
+ expect(body.total).to.equal(3)
+ expect(body.data).to.have.lengthOf(1)
+ expect(body.data[0].name).to.equal('second_video_channel')
+ }
+
+ {
+ const body = await servers[0].channels.listByAccount({ accountName, start: 1, count: 1, sort: 'createdAt' })
+
+ expect(body.total).to.equal(2)
+ expect(body.data).to.have.lengthOf(1)
+ expect(body.data[0].name).to.equal('second_video_channel')
+ }
+ })
+
+ it('Should delete the video channel avatar', async function () {
+ this.timeout(15000)
+ await servers[0].channels.deleteImage({ channelName: 'second_video_channel', type: 'avatar' })
+
+ await waitJobs(servers)
+
+ for (const server of servers) {
+ const videoChannel = await findChannel(server, secondVideoChannelId)
+ await testFileExistsOrNot(server, 'avatars', basename(avatarPaths[server.port]), false)
+
+ expect(videoChannel.avatars).to.be.empty
+ }
+ })
+
+ it('Should delete the video channel banner', async function () {
+ this.timeout(15000)
+
+ await servers[0].channels.deleteImage({ channelName: 'second_video_channel', type: 'banner' })
+
+ await waitJobs(servers)
+
+ for (const server of servers) {
+ const videoChannel = await findChannel(server, secondVideoChannelId)
+ await testFileExistsOrNot(server, 'avatars', basename(bannerPaths[server.port]), false)
+
+ expect(videoChannel.banners).to.be.empty
+ }