diff options
Diffstat (limited to 'server/tests/plugins/filter-hooks.ts')
-rw-r--r-- | server/tests/plugins/filter-hooks.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts index df52bb3b5..ba84dd27a 100644 --- a/server/tests/plugins/filter-hooks.ts +++ b/server/tests/plugins/filter-hooks.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { HttpStatusCode } from '@shared/core-utils' | 5 | import { HttpStatusCode } from '@shared/models' |
6 | import { | 6 | import { |
7 | cleanupTests, | 7 | cleanupTests, |
8 | createMultipleServers, | 8 | createMultipleServers, |
@@ -71,28 +71,28 @@ describe('Test plugin filter hooks', function () { | |||
71 | }) | 71 | }) |
72 | 72 | ||
73 | it('Should run filter:api.accounts.videos.list.params', async function () { | 73 | it('Should run filter:api.accounts.videos.list.params', async function () { |
74 | const { data } = await servers[0].videos.listByAccount({ accountName: 'root', start: 0, count: 2 }) | 74 | const { data } = await servers[0].videos.listByAccount({ handle: 'root', start: 0, count: 2 }) |
75 | 75 | ||
76 | // 1 plugin do +1 to the count parameter | 76 | // 1 plugin do +1 to the count parameter |
77 | expect(data).to.have.lengthOf(3) | 77 | expect(data).to.have.lengthOf(3) |
78 | }) | 78 | }) |
79 | 79 | ||
80 | it('Should run filter:api.accounts.videos.list.result', async function () { | 80 | it('Should run filter:api.accounts.videos.list.result', async function () { |
81 | const { total } = await servers[0].videos.listByAccount({ accountName: 'root', start: 0, count: 2 }) | 81 | const { total } = await servers[0].videos.listByAccount({ handle: 'root', start: 0, count: 2 }) |
82 | 82 | ||
83 | // Plugin do +2 to the total result | 83 | // Plugin do +2 to the total result |
84 | expect(total).to.equal(12) | 84 | expect(total).to.equal(12) |
85 | }) | 85 | }) |
86 | 86 | ||
87 | it('Should run filter:api.video-channels.videos.list.params', async function () { | 87 | it('Should run filter:api.video-channels.videos.list.params', async function () { |
88 | const { data } = await servers[0].videos.listByChannel({ videoChannelName: 'root_channel', start: 0, count: 2 }) | 88 | const { data } = await servers[0].videos.listByChannel({ handle: 'root_channel', start: 0, count: 2 }) |
89 | 89 | ||
90 | // 1 plugin do +3 to the count parameter | 90 | // 1 plugin do +3 to the count parameter |
91 | expect(data).to.have.lengthOf(5) | 91 | expect(data).to.have.lengthOf(5) |
92 | }) | 92 | }) |
93 | 93 | ||
94 | it('Should run filter:api.video-channels.videos.list.result', async function () { | 94 | it('Should run filter:api.video-channels.videos.list.result', async function () { |
95 | const { total } = await servers[0].videos.listByChannel({ videoChannelName: 'root_channel', start: 0, count: 2 }) | 95 | const { total } = await servers[0].videos.listByChannel({ handle: 'root_channel', start: 0, count: 2 }) |
96 | 96 | ||
97 | // Plugin do +3 to the total result | 97 | // Plugin do +3 to the total result |
98 | expect(total).to.equal(13) | 98 | expect(total).to.equal(13) |