This reverts commit 49abcf965b
.
This commit is contained in:
parent
868ab26fb3
commit
124ee4b7bb
|
@ -438,9 +438,6 @@ class TopicQuery
|
||||||
|
|
||||||
topics = topics.to_a
|
topics = topics.to_a
|
||||||
|
|
||||||
# These don't need to be shown in the topic list
|
|
||||||
topics = topics.reject { |t| [SiteSetting.privacy_topic_id, SiteSetting.tos_topic_id].include?(t[:id]) }
|
|
||||||
|
|
||||||
if options[:preload_posters]
|
if options[:preload_posters]
|
||||||
user_ids = []
|
user_ids = []
|
||||||
topics.each do |ft|
|
topics.each do |ft|
|
||||||
|
|
|
@ -79,19 +79,6 @@ RSpec.describe ListController do
|
||||||
expect(parsed["topic_list"]["topics"].length).to eq(1)
|
expect(parsed["topic_list"]["topics"].length).to eq(1)
|
||||||
end
|
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
|
it "shows correct title if topic list is set for homepage" do
|
||||||
get "/latest"
|
get "/latest"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue