mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
fix: don't show deleted topics on unread
This commit is contained in:
@@ -1461,6 +1461,14 @@ describe('Topic\'s', function () {
|
||||
},
|
||||
], done);
|
||||
});
|
||||
|
||||
it('should not return topic as unread if topic is deleted', async function () {
|
||||
const uid = await User.create({ username: 'regularJoe' });
|
||||
const result = await topics.post({ uid: adminUid, title: 'deleted unread', content: 'not unread', cid: categoryObj.cid });
|
||||
await topics.delete(result.topicData.tid, adminUid);
|
||||
const unreadTids = await topics.getUnreadTids({ cid: 0, uid: uid });
|
||||
assert(!unreadTids.includes(result.topicData.tid));
|
||||
});
|
||||
});
|
||||
|
||||
describe('tags', function () {
|
||||
|
||||
Reference in New Issue
Block a user