wikis: redirect legacy title param to show page.

Redirect /wiki_pages?title=touhou to /wiki_pages/touhou.
This commit is contained in:
evazion
2020-03-31 18:11:15 -05:00
parent 81488c7608
commit a272453bd0
2 changed files with 11 additions and 10 deletions

View File

@@ -31,6 +31,11 @@ class WikiPagesControllerTest < ActionDispatch::IntegrationTest
assert_response :success
assert_select "tr td:first-child", text: "abc"
end
should "redirect the legacy title param to the show page" do
get wiki_pages_path(title: "abc")
assert_redirected_to wiki_pages_path(search: { title_normalize: "abc" }, redirect: true)
end
end
context "search action" do