FEATURE: add period filter in top topics route for tags. (#13415)

And also move all the "top topics by period" routes to query string param.

/top/monthly => /top?period=monthly
/c/:slug/:id/l/top/monthly => /c/:slug/:id/l/top?period=monthly
/tag/:slug/l/top/daily => /tag/:slug/l/top?period=daily (new)
This commit is contained in:
Vinoth Kannan
2021-07-06 15:25:11 +05:30
committed by GitHub
parent 34387c5a38
commit 33eae4cbd8
24 changed files with 127 additions and 137 deletions

View File

@ -412,7 +412,7 @@ RSpec.describe ListController do
TopTopic.periods.each do |period|
it "renders #{period} top RSS" do
get "/top/#{period}.rss"
get "/top.rss?period=#{period}"
expect(response.status).to eq(200)
expect(response.media_type).to eq('application/rss+xml')
end