- it('Should have video channel deleted', async () => {
- const res = await getVideoChannelsList(server.url, 0, 10)
+ it('Should list the first video channel videos', async function () {
+ this.timeout(10000)
+
+ for (const server of servers) {
+ const secondChannelURI = 'second_video_channel@localhost:' + server.port
+ const res1 = await getVideoChannelVideos(server.url, server.accessToken, secondChannelURI, 0, 5)
+ expect(res1.body.total).to.equal(0)
+
+ const channelURI = 'root_channel@localhost:' + server.port
+ const res2 = await getVideoChannelVideos(server.url, server.accessToken, channelURI, 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')
+ }
+ })
+
+ it('Should delete video channel', async function () {
+ await deleteVideoChannel(servers[0].url, servers[0].accessToken, 'second_video_channel')
+ })
+
+ it('Should have video channel deleted', async function () {
+ const res = await getVideoChannelsList(servers[0].url, 0, 10)