FEATURE: New "Categories and Top" homepage style

Select this option if you want to show top topics on the homepage
instead of latest topics.
This commit is contained in:
Robin Ward
2018-03-02 21:53:29 -05:00
parent 5e323139ae
commit 31e3bf6d8d
14 changed files with 147 additions and 83 deletions

View File

@ -15,6 +15,21 @@ RSpec.describe ListController do
end
end
describe "categories and X" do
it "returns top topics" do
Fabricate(:topic, like_count: 1000, posts_count: 100)
TopTopic.refresh!
get "/categories_and_top.json"
data = JSON.parse(response.body)
expect(data["topic_list"]["topics"].length).to eq(1)
get "/categories_and_latest.json"
data = JSON.parse(response.body)
expect(data["topic_list"]["topics"].length).to eq(1)
end
end
describe 'suppress from latest' do
it 'supresses categories' do