+
+ it('Should filter by account', async function () {
+ for (const server of servers) {
+ {
+ const json = await getJSONfeed(server.url, 'videos', { accountId: rootAccountUUID })
+ const jsonObj = JSON.parse(json.text)
+ expect(jsonObj.items.length).to.be.equal(1)
+ expect(jsonObj.items[ 0 ].title).to.equal('my super name for server 1')
+ expect(jsonObj.items[ 0 ].author.name).to.equal('root')
+ }
+
+ {
+ const json = await getJSONfeed(server.url, 'videos', { accountId: userAccountUUID })
+ const jsonObj = JSON.parse(json.text)
+ expect(jsonObj.items.length).to.be.equal(1)
+ expect(jsonObj.items[ 0 ].title).to.equal('user video')
+ expect(jsonObj.items[ 0 ].author.name).to.equal('john')
+ }
+ }
+
+ {
+ const json = await getJSONfeed(servers[0].url, 'videos', { accountName: 'root' })
+ const jsonObj = JSON.parse(json.text)
+ expect(jsonObj.items.length).to.be.equal(1)
+ expect(jsonObj.items[ 0 ].title).to.equal('my super name for server 1')
+ }
+
+ {
+ const json = await getJSONfeed(servers[0].url, 'videos', { accountName: 'john' })
+ const jsonObj = JSON.parse(json.text)
+ expect(jsonObj.items.length).to.be.equal(1)
+ expect(jsonObj.items[ 0 ].title).to.equal('user video')
+ }
+ })
+
+ it('Should filter by video channel', async function () {
+ for (const server of servers) {
+ {
+ const json = await getJSONfeed(server.url, 'videos', { videoChannelId: rootChannelUUID })
+ const jsonObj = JSON.parse(json.text)
+ expect(jsonObj.items.length).to.be.equal(1)
+ expect(jsonObj.items[ 0 ].title).to.equal('my super name for server 1')
+ expect(jsonObj.items[ 0 ].author.name).to.equal('root')
+ }
+
+ {
+ const json = await getJSONfeed(server.url, 'videos', { videoChannelId: userChannelUUID })
+ const jsonObj = JSON.parse(json.text)
+ expect(jsonObj.items.length).to.be.equal(1)
+ expect(jsonObj.items[ 0 ].title).to.equal('user video')
+ expect(jsonObj.items[ 0 ].author.name).to.equal('john')
+ }
+ }
+
+ {
+ const json = await getJSONfeed(servers[0].url, 'videos', { videoChannelName: 'root_channel' })
+ const jsonObj = JSON.parse(json.text)
+ expect(jsonObj.items.length).to.be.equal(1)
+ expect(jsonObj.items[ 0 ].title).to.equal('my super name for server 1')
+ }
+
+ {
+ const json = await getJSONfeed(servers[0].url, 'videos', { videoChannelName: 'john_channel' })
+ const jsonObj = JSON.parse(json.text)
+ expect(jsonObj.items.length).to.be.equal(1)
+ expect(jsonObj.items[ 0 ].title).to.equal('user video')
+ }
+ })