Node.js based forum software built for the modern web
test: additional test for remote category topic assertion when ignoring category
Julian Lamc2f77cee04de
diff --git a/test/activitypub/notes.js b/test/activitypub/notes.jsindex 0bebb03927..3e2fbe7fcd 100644--- a/test/activitypub/notes.js+++ b/test/activitypub/notes.js@@ -192,6 +192,23 @@ describe('Notes', () => {await topics.markAllRead(uid);});++ it('should not show up in recent/unread if I am ignoring the remote category', async () => {+ await api.categories.setWatchState({ uid }, {+ cid: remoteCid,+ state: categories.watchStates.ignoring,+ uid,+ });++ const { id, note } = helpers.mocks.note({+ cc: [remoteCid],+ });+ const assertion = await activitypub.notes.assert(0, id);+ assert(assertion);++ const unread = await topics.getTotalUnread(uid);+ assert.strictEqual(unread, 0);+ })});});