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:
parent
d095c2cee7
commit
6e1fe22a9d
13 changed files with 135 additions and 34 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue