- const res = await getVideoChannelVideos(server.url, server.accessToken, videoChannelUUID, 0, 5)
- expect(res.body.total).to.equal(1)
- expect(res.body.data).to.be.an('array')
- expect(res.body.data).to.have.lengthOf(1)
- expect(res.body.data[0].name).to.equal('my video name')
+ const res1 = await getVideoChannelVideos(server.url, server.accessToken, secondVideoChannelUUID, 0, 5)
+ expect(res1.body.total).to.equal(1)
+ expect(res1.body.data).to.be.an('array')
+ expect(res1.body.data).to.have.lengthOf(1)
+ expect(res1.body.data[0].name).to.equal('my video name')
+ }
+ })
+
+ it('Should change the video channel of a video', async function () {
+ this.timeout(10000)
+
+ await updateVideo(servers[0].url, servers[0].accessToken, videoUUID, { channelId: firstVideoChannelId })
+
+ await wait(5000)
+ })
+
+ it('Should list the first video channel videos', async function () {
+ this.timeout(10000)
+
+ for (const server of servers) {
+ const res1 = await getVideoChannelVideos(server.url, server.accessToken, secondVideoChannelUUID, 0, 5)
+ expect(res1.body.total).to.equal(0)
+
+ const res2 = await getVideoChannelVideos(server.url, server.accessToken, firstVideoChannelUUID, 0, 5)
+ expect(res2.body.total).to.equal(1)
+
+ const videos: Video[] = res2.body.data
+ expect(videos).to.be.an('array')
+ expect(videos).to.have.lengthOf(1)
+ expect(videos[0].name).to.equal('my video name')