+ it('Should send a request to change ownership of a live', async function () {
+ this.timeout(15000)
+
+ await changeVideoOwnership(servers[0].url, firstUserAccessToken, liveId, secondUser.username)
+
+ const resSecondUser = await getVideoChangeOwnershipList(servers[0].url, secondUserAccessToken)
+
+ expect(resSecondUser.body.total).to.equal(3)
+ expect(resSecondUser.body.data.length).to.equal(3)
+
+ lastRequestChangeOwnershipId = resSecondUser.body.data[0].id
+ })
+
+ it('Should accept a live ownership change', async function () {
+ this.timeout(20000)
+
+ await acceptChangeOwnership(servers[0].url, secondUserAccessToken, lastRequestChangeOwnershipId, secondUserChannelId)
+
+ await waitJobs(servers)
+
+ for (const server of servers) {
+ const res = await getVideo(server.url, servers[0].video.uuid)
+
+ const video: VideoDetails = res.body
+
+ expect(video.name).to.equal('my super name')
+ expect(video.channel.displayName).to.equal('Main second channel')
+ expect(video.channel.name).to.equal('second_channel')
+ }
+ })
+