diff options
Diffstat (limited to 'server/tests/plugins')
-rw-r--r-- | server/tests/plugins/filter-hooks.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/server/tests/plugins/filter-hooks.ts b/server/tests/plugins/filter-hooks.ts index 4d26ff8b7..43749b0b5 100644 --- a/server/tests/plugins/filter-hooks.ts +++ b/server/tests/plugins/filter-hooks.ts | |||
@@ -605,6 +605,27 @@ describe('Test plugin filter hooks', function () { | |||
605 | }) | 605 | }) |
606 | }) | 606 | }) |
607 | 607 | ||
608 | describe('Client HTML filters', function () { | ||
609 | let videoUUID: string | ||
610 | |||
611 | before(async function () { | ||
612 | this.timeout(60000) | ||
613 | |||
614 | const { uuid } = await servers[0].videos.quickUpload({ name: 'html video' }) | ||
615 | videoUUID = uuid | ||
616 | }) | ||
617 | |||
618 | it('Should run filter:html.client.json-ld.result', async function () { | ||
619 | const res = await makeGetRequest({ url: servers[0].url, path: '/w/' + videoUUID, expectedStatus: HttpStatusCode.OK_200 }) | ||
620 | expect(res.text).to.contain('"recordedAt":"http://example.com/recordedAt"') | ||
621 | }) | ||
622 | |||
623 | it('Should not run filter:html.client.json-ld.result with an account', async function () { | ||
624 | const res = await makeGetRequest({ url: servers[0].url, path: '/a/root', expectedStatus: HttpStatusCode.OK_200 }) | ||
625 | expect(res.text).not.to.contain('"recordedAt":"http://example.com/recordedAt"') | ||
626 | }) | ||
627 | }) | ||
628 | |||
608 | describe('Search filters', function () { | 629 | describe('Search filters', function () { |
609 | 630 | ||
610 | before(async function () { | 631 | before(async function () { |