mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 00:33:31 +08:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user