FEATURE: Hide Privacy Policy and TOS topics (#18533)

* FEATURE: Hide Privacy Policy and TOS topics

As a way to simplify new sites this change will hide the privacy policy
and the TOS topics from the topic list. They can still be accessed and
edited though.

* add tests
This commit is contained in:
Blake Erickson
2022-10-10 17:19:18 -06:00
committed by GitHub
parent cab173d3b5
commit 49abcf965b
2 changed files with 16 additions and 0 deletions

View File

@ -79,6 +79,19 @@ RSpec.describe ListController do
expect(parsed["topic_list"]["topics"].length).to eq(1)
end
it 'filters out privacy policy and tos topics' do
tos_topic = create_topic
SiteSetting.tos_topic_id = tos_topic.id
pp_topic = create_topic
SiteSetting.privacy_topic_id = pp_topic.id
get "/latest.json"
expect(response.status).to eq(200)
parsed = response.parsed_body
expect(parsed["topic_list"]["topics"].length).to eq(1)
end
it "shows correct title if topic list is set for homepage" do
get "/latest"