mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FEATURE: add category suppress from latest
In the past we used suppress_from_homepage, it had mixed semantics it would remove from category list if category list was on home and unconditionally remove from latest. New setting explicitly only removes from latest list but leaves the category list alond
This commit is contained in:
@ -364,13 +364,13 @@ describe ListController do
|
||||
|
||||
describe "categories suppression" do
|
||||
let(:category_one) { Fabricate(:category) }
|
||||
let(:sub_category) { Fabricate(:category, parent_category: category_one, suppress_from_homepage: true) }
|
||||
let(:sub_category) { Fabricate(:category, parent_category: category_one, suppress_from_latest: true) }
|
||||
let!(:topic_in_sub_category) { Fabricate(:topic, category: sub_category) }
|
||||
|
||||
let(:category_two) { Fabricate(:category, suppress_from_homepage: true) }
|
||||
let(:category_two) { Fabricate(:category, suppress_from_latest: true) }
|
||||
let!(:topic_in_category_two) { Fabricate(:topic, category: category_two) }
|
||||
|
||||
it "suppresses categories from the homepage" do
|
||||
it "suppresses categories from the latest list" do
|
||||
get SiteSetting.homepage, format: :json
|
||||
expect(response).to be_success
|
||||
|
||||
|
Reference in New Issue
Block a user