+ it('Should search all the root author videos', function (done) {
+ utils.searchVideoWithPagination(server.url, 'root', 'author', 0, 15, function (err, res) {
+ if (err) throw err
+
+ const videos = res.body.data
+ expect(res.body.total).to.equal(6)
+ expect(videos.length).to.equal(6)
+
+ done()
+ })
+ })
+
+ it('Should search all the 9001 port videos', function (done) {
+ utils.searchVideoWithPagination(server.url, '9001', 'podUrl', 0, 15, function (err, res) {
+ if (err) throw err
+
+ const videos = res.body.data
+ expect(res.body.total).to.equal(6)
+ expect(videos.length).to.equal(6)
+
+ done()
+ })
+ })
+
+ it('Should search all the localhost videos', function (done) {
+ utils.searchVideoWithPagination(server.url, 'localhost', 'podUrl', 0, 15, function (err, res) {
+ if (err) throw err
+
+ const videos = res.body.data
+ expect(res.body.total).to.equal(6)
+ expect(videos.length).to.equal(6)
+
+ done()
+ })
+ })
+
+ it('Should search the good magnetUri video', function (done) {
+ const video = videosListBase[0]
+ utils.searchVideoWithPagination(server.url, encodeURIComponent(video.magnetUri), 'magnetUri', 0, 15, function (err, res) {
+ if (err) throw err
+
+ const videos = res.body.data
+ expect(res.body.total).to.equal(1)
+ expect(videos.length).to.equal(1)
+ expect(videos[0].name).to.equal(video.name)
+
+ done()
+ })
+ })
+