- 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('channel1_server1')
- expect(res.body.data[ 0 ].displayName).to.equal('Channel 1 server 1')
+ expect(body.total).to.equal(1)
+ expect(body.data).to.be.an('array')
+ expect(body.data).to.have.lengthOf(1)
+ expect(body.data[0].name).to.equal('channel1_server1')
+ expect(body.data[0].displayName).to.equal('Channel 1 server 1')
+ }
+ })
+
+ it('Should search a local video channel with an alternative URL', async function () {
+ const search = 'http://localhost:' + servers[0].port + '/c/channel1_server1'
+
+ for (const token of [ undefined, servers[0].accessToken ]) {
+ const body = await command.searchChannels({ search, token })
+
+ expect(body.total).to.equal(1)
+ expect(body.data).to.be.an('array')
+ expect(body.data).to.have.lengthOf(1)
+ expect(body.data[0].name).to.equal('channel1_server1')
+ expect(body.data[0].displayName).to.equal('Channel 1 server 1')