]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-comments.ts
Add ability to list comments on local videos
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-comments.ts
index 1488ce2b5a32cbedbac9a51231bc85c443ea48dc..5ab401aa40c8ab395dc4a22a5b2dc75bc3335ede 100644 (file)
@@ -254,6 +254,22 @@ describe('Test video comments', function () {
       expect(total).to.equal(0)
     })
 
+    it('Should filter instance comments by onLocalVideo', async function () {
+      {
+        const { total, data } = await command.listForAdmin({ onLocalVideo: false })
+
+        expect(data).to.have.lengthOf(0)
+        expect(total).to.equal(0)
+      }
+
+      {
+        const { total, data } = await command.listForAdmin({ onLocalVideo: true })
+
+        expect(data).to.not.have.lengthOf(0)
+        expect(total).to.not.equal(0)
+      }
+    })
+
     it('Should search instance comments by account', async function () {
       const { total, data } = await command.listForAdmin({ searchAccount: 'user' })