diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-25 15:17:58 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-07-25 15:17:58 +0200 |
commit | 9901c8d6908a43ab4594406446eac770ee21176c (patch) | |
tree | cc59c2c45d96bd51053e283db1121baa2723b765 /server/tests/plugins/action-hooks.ts | |
parent | 3b46eec8aeb95eb0dce763e3569c0509b1da7607 (diff) | |
download | PeerTube-9901c8d6908a43ab4594406446eac770ee21176c.tar.gz PeerTube-9901c8d6908a43ab4594406446eac770ee21176c.tar.zst PeerTube-9901c8d6908a43ab4594406446eac770ee21176c.zip |
Add video file update hook tests
Diffstat (limited to 'server/tests/plugins/action-hooks.ts')
-rw-r--r-- | server/tests/plugins/action-hooks.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/server/tests/plugins/action-hooks.ts b/server/tests/plugins/action-hooks.ts index 34b4e1891..773be0d76 100644 --- a/server/tests/plugins/action-hooks.ts +++ b/server/tests/plugins/action-hooks.ts | |||
@@ -40,6 +40,8 @@ describe('Test plugin action hooks', function () { | |||
40 | } | 40 | } |
41 | }) | 41 | }) |
42 | 42 | ||
43 | await servers[0].config.enableFileUpdate() | ||
44 | |||
43 | await doubleFollow(servers[0], servers[1]) | 45 | await doubleFollow(servers[0], servers[1]) |
44 | }) | 46 | }) |
45 | 47 | ||
@@ -70,6 +72,12 @@ describe('Test plugin action hooks', function () { | |||
70 | await checkHook('action:api.video.viewed') | 72 | await checkHook('action:api.video.viewed') |
71 | }) | 73 | }) |
72 | 74 | ||
75 | it('Should run action:api.video.file-updated', async function () { | ||
76 | await servers[0].videos.replaceSourceFile({ videoId: videoUUID, fixture: 'video_short.mp4' }) | ||
77 | |||
78 | await checkHook('action:api.video.file-updated') | ||
79 | }) | ||
80 | |||
73 | it('Should run action:api.video.deleted', async function () { | 81 | it('Should run action:api.video.deleted', async function () { |
74 | await servers[0].videos.remove({ id: videoUUID }) | 82 | await servers[0].videos.remove({ id: videoUUID }) |
75 | 83 | ||