- 'http://localhost:' + servers[0].port + '/videos/watch/playlist/' + playlistServer1UUID,
- 'http://localhost:' + servers[0].port + '/w/p/' + playlistServer1UUID
+ servers[0].url + '/videos/watch/playlist/' + playlistServer1UUID,
+ servers[0].url + '/w/p/' + playlistServer1UUID
+ ]
+
+ for (const search of searches) {
+ for (const token of [ undefined, servers[0].accessToken ]) {
+ const body = await command.searchPlaylists({ 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].displayName).to.equal('playlist 1 on server 1')
+ expect(body.data[0].videosLength).to.equal(2)
+ }
+ }
+ })
+
+ it('Should search a local playlist with a query in URL', async function () {
+ const searches = [
+ servers[0].url + '/videos/watch/playlist/' + playlistServer1UUID,
+ servers[0].url + '/w/p/' + playlistServer1UUID