mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +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:
parent
d2b518c61c
commit
720e1965e3
18 changed files with 67 additions and 30 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue