diff --git a/packages/backend/test/unit/activitypub.ts b/packages/backend/test/unit/activitypub.ts index 763ce2b336..1e0a355d8b 100644 --- a/packages/backend/test/unit/activitypub.ts +++ b/packages/backend/test/unit/activitypub.ts @@ -210,7 +210,7 @@ describe('ActivityPub', () => { }); describe('Collection visibility', () => { - test('Public following/followers', async () => { + test('Public following/followers/reactions', async () => { const actor = createRandomActor(); actor.following = { id: `${actor.id}/following`, @@ -219,6 +219,12 @@ describe('ActivityPub', () => { first: `${actor.id}/following?page=1`, }; actor.followers = `${actor.id}/followers`; + actor.liked ={ + id: `${actor.id}/following`, + type: 'OrderedCollection', + totalItems: 0, + orderedItems: [], + }; resolver.register(actor.id, actor); resolver.register(actor.followers, { @@ -233,9 +239,10 @@ describe('ActivityPub', () => { assert.deepStrictEqual(userProfile.followingVisibility, 'public'); assert.deepStrictEqual(userProfile.followersVisibility, 'public'); + assert.deepStrictEqual(userProfile.publicReactions, true); }); - test('Private following/followers', async () => { + test('Private following/followers/reactions', async () => { const actor = createRandomActor(); actor.following = { id: `${actor.id}/following`, @@ -244,6 +251,7 @@ describe('ActivityPub', () => { // first: … }; actor.followers = `${actor.id}/followers`; + // actor.liked = …; resolver.register(actor.id, actor); //resolver.register(actor.followers, { … }); @@ -253,6 +261,7 @@ describe('ActivityPub', () => { assert.deepStrictEqual(userProfile.followingVisibility, 'private'); assert.deepStrictEqual(userProfile.followersVisibility, 'private'); + assert.deepStrictEqual(userProfile.publicReactions, false); }); });