Node.js based forum software built for the modern web
test: article for new topic, note for replies
Julian Lam3e508d6c65fc
diff --git a/test/activitypub/notes.js b/test/activitypub/notes.jsindex 3b33242d6f..ab3aa75271 100644--- a/test/activitypub/notes.js+++ b/test/activitypub/notes.js@@ -298,6 +298,37 @@ describe('Notes', () => {assert(addressees.has(`${nconf.get('url')}/category/${cid}`));});++ it('should federate out an activity with object of type "Article"', () => {+ assert(activity.object && activity.object.type);+ assert.strictEqual(activity.object.type, 'Article');+ });+ });++ describe('new reply', () => {+ let activity;++ before(async () => {+ const { tid } = await api.topics.create({ uid }, {+ cid,+ title: utils.generateUUID(),+ content: utils.generateUUID(),+ });+ activitypub._sent.clear();++ const { pid } = await api.topics.reply({ uid }, {+ tid,+ content: utils.generateUUID(),+ });++ const key = Array.from(activitypub._sent.keys())[0];+ activity = activitypub._sent.get(key);+ });++ it('should federate out an activity with object of type "Note"', () => {+ assert(activity.object && activity.object.type);+ assert.strictEqual(activity.object.type, 'Note');+ })});});