aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/filter-hooks.ts
diff options
context:
space:
mode:
authorWicklow <123956049+wickloww@users.noreply.github.com>2023-03-02 13:50:55 +0000
committerGitHub <noreply@github.com>2023-03-02 14:50:55 +0100
commit692ae8c31caa5a404142c9f46e03fdc8dc5b233f (patch)
tree17d12edb5cfbfeddff2fd6f0d85b11c8954da89e /server/tests/plugins/filter-hooks.ts
parentc0a4982ebe27c89f296a0bbd518e938f09d1f054 (diff)
downloadPeerTube-692ae8c31caa5a404142c9f46e03fdc8dc5b233f.tar.gz
PeerTube-692ae8c31caa5a404142c9f46e03fdc8dc5b233f.tar.zst
PeerTube-692ae8c31caa5a404142c9f46e03fdc8dc5b233f.zip
Hotfix/filter subscription videos (#5665)
* Fix filters on subscription videos * Add tests to common video filters * Improve reliability when skipping subscrition path * Better parameters for skipping subscription videos
Diffstat (limited to 'server/tests/plugins/filter-hooks.ts')
-rw-r--r--server/tests/plugins/filter-hooks.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts
index 6bd38cf65..a7e052d06 100644
--- a/server/tests/plugins/filter-hooks.ts
+++ b/server/tests/plugins/filter-hooks.ts
@@ -155,14 +155,14 @@ describe('Test plugin filter hooks', function () {
155 }) 155 })
156 156
157 it('Should run filter:api.user.me.subscription-videos.list.params', async function () { 157 it('Should run filter:api.user.me.subscription-videos.list.params', async function () {
158 const { data } = await servers[0].subscriptions.listVideos() 158 const { data } = await servers[0].videos.listMySubscriptionVideos({ start: 0, count: 2 })
159 159
160 // 1 plugin set the count parameter to 1 160 // 1 plugin do +1 to the count parameter
161 expect(data).to.have.lengthOf(1) 161 expect(data).to.have.lengthOf(3)
162 }) 162 })
163 163
164 it('Should run filter:api.user.me.subscription-videos.list.result', async function () { 164 it('Should run filter:api.user.me.subscription-videos.list.result', async function () {
165 const { total } = await servers[0].subscriptions.listVideos() 165 const { total } = await servers[0].videos.listMySubscriptionVideos({ start: 0, count: 2 })
166 166
167 // Plugin do +4 to the total result 167 // Plugin do +4 to the total result
168 expect(total).to.equal(14) 168 expect(total).to.equal(14)