aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-03-10 15:08:56 +0100
committerChocobozzz <me@florianbigard.com>2023-03-10 15:45:52 +0100
commit58e735dd77a4ea8fc9e8da3b54fd338bf9e3558b (patch)
treeeb2f315096e8013ec684438130639f6251110f5f /server/tests/fixtures
parent3b504f6ed4e890bebb46d0481aba15b43050323a (diff)
downloadPeerTube-58e735dd77a4ea8fc9e8da3b54fd338bf9e3558b.tar.gz
PeerTube-58e735dd77a4ea8fc9e8da3b54fd338bf9e3558b.tar.zst
PeerTube-58e735dd77a4ea8fc9e8da3b54fd338bf9e3558b.zip
Add test on AP hooks
Diffstat (limited to 'server/tests/fixtures')
-rw-r--r--server/tests/fixtures/peertube-plugin-test/main.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js
index f01da0226..6d06ec17d 100644
--- a/server/tests/fixtures/peertube-plugin-test/main.js
+++ b/server/tests/fixtures/peertube-plugin-test/main.js
@@ -208,6 +208,18 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
208 // --------------------------------------------------------------------------- 208 // ---------------------------------------------------------------------------
209 209
210 registerHook({ 210 registerHook({
211 target: 'filter:activity-pub.activity.context.build.result',
212 handler: context => context.concat([ 'https://example.com/new-context' ])
213 })
214
215 registerHook({
216 target: 'filter:activity-pub.video.json-ld.build.result',
217 handler: (jsonld, { video }) => ({ ...jsonld, videoName: video.name })
218 })
219
220 // ---------------------------------------------------------------------------
221
222 registerHook({
211 target: 'filter:api.video-threads.list.params', 223 target: 'filter:api.video-threads.list.params',
212 handler: obj => addToCount(obj) 224 handler: obj => addToCount(obj)
213 }) 225 })