Node.js based forum software built for the modern web
test: have ap helper mocks for person and group auto-save to ap cache
Julian Lam80069a198c7c
diff --git a/test/activitypub/actors.js b/test/activitypub/actors.jsindex 02ab5ffce4..ab3438225e 100644--- a/test/activitypub/actors.js+++ b/test/activitypub/actors.js@@ -111,7 +111,6 @@ describe.only('Group assertion', () => {before(async () => {const { id, actor } = helpers.mocks.group();actorUri = id;- activitypub._cache.set(`0;${id}`, actor);});it('should assert a uri identifying as "Group" into a remote category', async () => {diff --git a/test/activitypub/feps.js b/test/activitypub/feps.jsindex 2df2b99587..a9b42644d8 100644--- a/test/activitypub/feps.js+++ b/test/activitypub/feps.js@@ -38,7 +38,6 @@ describe('FEPs', () => {uid = await user.create({ username: utils.generateUUID() });const { id: followerId, actor } = helpers.mocks.person();- activitypub._cache.set(`0;${followerId}`, actor);user.setCategoryWatchState(followerId, [cid], categories.watchStates.tracking);activitypub._sent.clear();diff --git a/test/activitypub/helpers.js b/test/activitypub/helpers.jsindex 6873dc0340..6652ac63ee 100644--- a/test/activitypub/helpers.js+++ b/test/activitypub/helpers.js@@ -34,6 +34,8 @@ Helpers.mocks.person = () => {},};+ activitypub._cache.set(`0;${id}`, actor);+return { id, actor };};@@ -41,6 +43,8 @@ Helpers.mocks.group = () => {const { id, actor } = Helpers.mocks.person();actor.type = 'Group';+ activitypub._cache.set(`0;${id}`, actor);+return { id, actor };};diff --git a/test/activitypub/notes.js b/test/activitypub/notes.jsindex e8198d946b..c9c5e42e7b 100644--- a/test/activitypub/notes.js+++ b/test/activitypub/notes.js@@ -85,7 +85,6 @@ describe('Notes', () => {it('should slot newly created topic in remote category if addressed', async () => {const { id: cid, actor } = helpers.mocks.group();- activitypub._cache.set(`0;${cid}`, actor);await activitypub.actors.assertGroup([cid]);const { id } = helpers.mocks.note({@@ -120,7 +119,6 @@ describe('Notes', () => {// Remoteconst { id, actor } = helpers.mocks.group();remoteCid = id;- activitypub._cache.set(`0;${id}`, actor);await activitypub.actors.assertGroup([id]);// User