2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-07 12:02:53 +08:00

FEATURE: Dismiss new per category (#8330)

Ability to dismiss new topics per category.
This commit is contained in:
Krzysztof Kotlarek 2019-11-14 11:16:13 +11:00 committed by GitHub
parent d095c2cee7
commit 6e1fe22a9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 135 additions and 34 deletions

View file

@ -273,6 +273,19 @@ describe TopicQuery do
end
end
context 'already seen categories' do
it 'is removed from new and visible on latest lists' do
category = Fabricate(:category_with_definition)
topic = Fabricate(:topic, category: category)
CategoryUser.create!(user_id: user.id,
category_id: category.id,
last_seen_at: topic.created_at
)
expect(topic_query.list_new.topics.map(&:id)).not_to include(topic.id)
expect(topic_query.list_latest.topics.map(&:id)).to include(topic.id)
end
end
context 'muted tags' do
it 'is removed from new and latest lists' do
SiteSetting.tagging_enabled = true