]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/videos-filter.ts
Add ability to display all channel/account videos
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / videos-filter.ts
index 95e12e43cd64e30876f5b611a0161a36b3d9589e..6b9a4b6d45a8cb895ce78807746c623d2a6de9cd 100644 (file)
@@ -116,6 +116,20 @@ describe('Test videos filter validator', function () {
         }
       }
     })
+
+    it('Should display all videos by the admin or the moderator', async function () {
+      for (const server of servers) {
+        for (const token of [ server.accessToken, server['moderatorAccessToken'] ]) {
+
+          const [ channelVideos, accountVideos, videos, searchVideos ] = await getVideosNames(server, token, 'all')
+          expect(channelVideos).to.have.lengthOf(3)
+          expect(accountVideos).to.have.lengthOf(3)
+
+          expect(videos).to.have.lengthOf(5)
+          expect(searchVideos).to.have.lengthOf(5)
+        }
+      }
+    })
   })
 
   after(async function () {