|
|
@@ -14,6 +14,7 @@ import { |
|
|
|
cleanupTests, |
|
|
|
createMultipleServers, |
|
|
|
doubleFollow, |
|
|
|
makeActivityPubGetRequest, |
|
|
|
makeGetRequest, |
|
|
|
makeRawRequest, |
|
|
|
PeerTubeServer, |
|
|
@@ -846,6 +847,22 @@ describe('Test plugin filter hooks', function () { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
describe('Activity Pub', function () { |
|
|
|
|
|
|
|
it('Should run filter:activity-pub.activity.context.build.result', async function () { |
|
|
|
const { body } = await makeActivityPubGetRequest(servers[0].url, '/w/' + videoUUID) |
|
|
|
expect(body.type).to.equal('Video') |
|
|
|
|
|
|
|
expect(body['@context'].some(c => c === 'https://example.com/new-context')).to.be.true |
|
|
|
}) |
|
|
|
|
|
|
|
it('Should run filter:activity-pub.video.json-ld.build.result', async function () { |
|
|
|
const { body } = await makeActivityPubGetRequest(servers[0].url, '/w/' + videoUUID) |
|
|
|
expect(body.name).to.equal('default video 0') |
|
|
|
expect(body.videoName).to.equal('default video 0') |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
after(async function () { |
|
|
|
await cleanupTests(servers) |
|
|
|
}) |
|
|
|