mirror of
https://github.com/discourse/discourse.git
synced 2025-06-25 01:30:17 +08:00
FIX: redirect to parent tag when synonym page visited (#31688)
When a synonym page is visited, the user should be redirected to the parent tag.
This commit is contained in:

committed by
GitHub

parent
2237a0b0d5
commit
7da4fe82b6
@ -427,8 +427,9 @@ RSpec.describe TagsController do
|
||||
|
||||
it "should handle synonyms" do
|
||||
synonym = Fabricate(:tag, target_tag: tag)
|
||||
get "/tag/#{synonym.name}"
|
||||
expect(response.status).to eq(200)
|
||||
get "/tag/#{synonym.name}/l/top.json?period=daily"
|
||||
expect(response.status).to eq(302)
|
||||
expect(response.redirect_url).to match(%r{/tag/#{tag.name}/l/top.json\?period=daily})
|
||||
end
|
||||
|
||||
it "does not show staff-only tags" do
|
||||
|
Reference in New Issue
Block a user