Fix nested blank search params not being stripped from searches.
From https://danbooru.donmai.us/forum_topics/9127?page=258#forum_post_151308: When you do a user search (from https://danbooru.donmai.us/users/search) the results only include those with someone in the inviter field. The bug was that nested blank search params (/users?search[inviter][name_matches]=) didn't get stripped from the search.
This commit is contained in:
@@ -26,6 +26,11 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
|
||||
get users_path, params: {:search => {:name_matches => @user.name}}
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
should "list all users (with blank search parameters)" do
|
||||
get users_path, params: { search: { inviter: { name_matches: "" }, level: "", name: "test" } }
|
||||
assert_redirected_to users_path(search: { name: "test" })
|
||||
end
|
||||
end
|
||||
|
||||
context "show action" do
|
||||
|
||||
Reference in New Issue
Block a user