aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-07-27 17:00:39 +0200
committerRigel Kent <par@rigelk.eu>2020-07-29 18:15:53 +0200
commit7b3909644dd7cb8be1caad537bb40605e5f059d4 (patch)
tree499d23362c0532cd689624a35b98d8f51ba73ed4 /server/tests/api/videos
parent225a7682e68d81c3c90ff50e704db4ab5f81a341 (diff)
downloadPeerTube-7b3909644dd7cb8be1caad537bb40605e5f059d4.tar.gz
PeerTube-7b3909644dd7cb8be1caad537bb40605e5f059d4.tar.zst
PeerTube-7b3909644dd7cb8be1caad537bb40605e5f059d4.zip
test search for subscriptions and video-channels
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/video-channels.ts26
1 files changed, 26 insertions, 0 deletions
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts
index 3493a723d..367f99fdd 100644
--- a/server/tests/api/videos/video-channels.ts
+++ b/server/tests/api/videos/video-channels.ts
@@ -421,6 +421,32 @@ describe('Test video channels', function () {
421 expect(totoChannel.videosCount).to.equal(0) 421 expect(totoChannel.videosCount).to.equal(0)
422 }) 422 })
423 423
424 it('Should search among account video channels', async function () {
425 {
426 const res = await getAccountVideoChannelsList({
427 url: servers[0].url,
428 accountName: userInfo.account.name + '@' + userInfo.account.host,
429 search: 'root'
430 })
431 expect(res.body.total).to.equal(1)
432
433 const channels = res.body.data
434 expect(channels).to.have.lengthOf(1)
435 }
436
437 {
438 const res = await getAccountVideoChannelsList({
439 url: servers[0].url,
440 accountName: userInfo.account.name + '@' + userInfo.account.host,
441 search: 'does not exist'
442 })
443 expect(res.body.total).to.equal(0)
444
445 const channels = res.body.data
446 expect(channels).to.have.lengthOf(0)
447 }
448 })
449
424 after(async function () { 450 after(async function () {
425 await cleanupTests(servers) 451 await cleanupTests(servers)
426 }) 452 })