- 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 a query in URL', async function () {
+ const searches = [
+ servers[0].url + '/video-channels/channel1_server1',
+ servers[0].url + '/c/channel1_server1'
+ ]
+
+ for (const search of searches) {
+ for (const token of [ undefined, servers[0].accessToken ]) {
+ const body = await command.searchChannels({ search: search + '?param=2', 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')
+ }