application controller: fix errors in normalize_search.
Fix exceptions in `normalize_search` on e.g. `https://danbooru.donmai.us/users?search=blah`. Caused when the `search` param is not a hash.
This commit is contained in:
@@ -35,5 +35,10 @@ class ApplicationControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_response 410
|
||||
end
|
||||
end
|
||||
|
||||
should "normalize search params" do
|
||||
get tags_path, params: { search: { name: "bkub", post_count: "" } }
|
||||
assert_redirected_to tags_path(search: { name: "bkub" })
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user