test: additional test for remote category topic assertion when ignoring category

This commit is contained in:
Julian Lam
2025-03-25 10:44:39 -04:00
parent c4274a3dca
commit c2f77cee04

View File

@@ -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);
})
});
});