diff options
author | Chocobozzz <me@florianbigard.com> | 2023-03-10 15:45:31 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-03-10 15:45:52 +0100 |
commit | 2b02a9b98cfc93a01b52ad6cb893e3d089fec472 (patch) | |
tree | 86917f6b6bd1be3162b72652eb180bc7f78d014a /server/tests | |
parent | 3cda7efaaa732ea586d8d87ffa80c645e61ed432 (diff) | |
download | PeerTube-2b02a9b98cfc93a01b52ad6cb893e3d089fec472.tar.gz PeerTube-2b02a9b98cfc93a01b52ad6cb893e3d089fec472.tar.zst PeerTube-2b02a9b98cfc93a01b52ad6cb893e3d089fec472.zip |
Fix tests
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/fixtures/peertube-plugin-test/main.js | 2 | ||||
-rw-r--r-- | server/tests/plugins/filter-hooks.ts | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js index 6d06ec17d..5325e14c4 100644 --- a/server/tests/fixtures/peertube-plugin-test/main.js +++ b/server/tests/fixtures/peertube-plugin-test/main.js | |||
@@ -209,7 +209,7 @@ async function register ({ registerHook, registerSetting, settingsManager, stora | |||
209 | 209 | ||
210 | registerHook({ | 210 | registerHook({ |
211 | target: 'filter:activity-pub.activity.context.build.result', | 211 | target: 'filter:activity-pub.activity.context.build.result', |
212 | handler: context => context.concat([ 'https://example.com/new-context' ]) | 212 | handler: context => context.concat([ { recordedAt: 'https://schema.org/recordedAt' } ]) |
213 | }) | 213 | }) |
214 | 214 | ||
215 | registerHook({ | 215 | registerHook({ |
diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts index ab3a6a093..4d26ff8b7 100644 --- a/server/tests/plugins/filter-hooks.ts +++ b/server/tests/plugins/filter-hooks.ts | |||
@@ -853,7 +853,9 @@ describe('Test plugin filter hooks', function () { | |||
853 | const { body } = await makeActivityPubGetRequest(servers[0].url, '/w/' + videoUUID) | 853 | const { body } = await makeActivityPubGetRequest(servers[0].url, '/w/' + videoUUID) |
854 | expect(body.type).to.equal('Video') | 854 | expect(body.type).to.equal('Video') |
855 | 855 | ||
856 | expect(body['@context'].some(c => c === 'https://example.com/new-context')).to.be.true | 856 | expect(body['@context'].some(c => { |
857 | return typeof c === 'object' && c.recordedAt === 'https://schema.org/recordedAt' | ||
858 | })).to.be.true | ||
857 | }) | 859 | }) |
858 | 860 | ||
859 | it('Should run filter:activity-pub.video.json-ld.build.result', async function () { | 861 | it('Should run filter:activity-pub.video.json-ld.build.result', async function () { |