- 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].uuid).to.equal(videoUUID)
+ expect(total).to.equal(1)
+ expect(data).to.be.an('array')
+ expect(data).to.have.lengthOf(1)
+ expect(data[0].uuid).to.equal(videoUUID)
+ }
+ })
+
+ it('Should search through account videos', async function () {
+ const created = await servers[0].videos.upload({ token: userAccessToken, attributes: { name: 'Kami no chikara' } })
+
+ await waitJobs(servers)
+
+ for (const server of servers) {
+ const { total, data } = await server.videos.listByAccount({ handle: 'user1@' + servers[0].host, search: 'Kami' })
+
+ expect(total).to.equal(1)
+ expect(data).to.be.an('array')
+ expect(data).to.have.lengthOf(1)
+ expect(data[0].uuid).to.equal(created.uuid)