mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FIX: Respect show_category_definitions_in_topic_lists in category lists (#10853)
When that site setting is enabled, the category counts (new/unread) include the subcategory definition topics, but the topics aren't included in the list. This fixes that discrepancy.
This commit is contained in:
@ -217,6 +217,11 @@ describe TopicQuery do
|
||||
expect(TopicQuery.new(moderator, category: category.id, no_subcategories: true).list_latest.topics.size).to eq(1)
|
||||
end
|
||||
|
||||
it "shows a subcategory definition topic in its parent list with the right site setting" do
|
||||
SiteSetting.show_category_definitions_in_topic_lists = true
|
||||
expect(TopicQuery.new(moderator, category: category.id).list_latest.topics.size).to eq(2)
|
||||
end
|
||||
|
||||
it "works with subsubcategories" do
|
||||
SiteSetting.max_category_nesting = 3
|
||||
|
||||
|
Reference in New Issue
Block a user