diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-03 11:33:43 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-03 11:33:43 +0200 |
commit | 785f1897a42984ece9c6f65829d195d67e331d95 (patch) | |
tree | 1cb3b33cfc797b8f1abbab90749c1e3187bbd311 /server/tests/plugins | |
parent | 0260dc8aca952f9412a8620e433b9e16e675696e (diff) | |
download | PeerTube-785f1897a42984ece9c6f65829d195d67e331d95.tar.gz PeerTube-785f1897a42984ece9c6f65829d195d67e331d95.tar.zst PeerTube-785f1897a42984ece9c6f65829d195d67e331d95.zip |
Add notification plugin hook
Diffstat (limited to 'server/tests/plugins')
-rw-r--r-- | server/tests/plugins/action-hooks.ts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/server/tests/plugins/action-hooks.ts b/server/tests/plugins/action-hooks.ts index 209db95a4..405f81d7c 100644 --- a/server/tests/plugins/action-hooks.ts +++ b/server/tests/plugins/action-hooks.ts | |||
@@ -17,8 +17,8 @@ describe('Test plugin action hooks', function () { | |||
17 | let videoUUID: string | 17 | let videoUUID: string |
18 | let threadId: number | 18 | let threadId: number |
19 | 19 | ||
20 | function checkHook (hook: ServerHookName) { | 20 | function checkHook (hook: ServerHookName, strictCount = true) { |
21 | return servers[0].servers.waitUntilLog('Run hook ' + hook) | 21 | return servers[0].servers.waitUntilLog('Run hook ' + hook, 1, strictCount) |
22 | } | 22 | } |
23 | 23 | ||
24 | before(async function () { | 24 | before(async function () { |
@@ -225,6 +225,13 @@ describe('Test plugin action hooks', function () { | |||
225 | }) | 225 | }) |
226 | }) | 226 | }) |
227 | 227 | ||
228 | describe('Notification hook', function () { | ||
229 | |||
230 | it('Should run action:notifier.notification.created', async function () { | ||
231 | await checkHook('action:notifier.notification.created', false) | ||
232 | }) | ||
233 | }) | ||
234 | |||
228 | after(async function () { | 235 | after(async function () { |
229 | await cleanupTests(servers) | 236 | await cleanupTests(servers) |
230 | }) | 237 | }) |