Passing in a Hash instance as non-kwargs parameters has to be curly braced now

This commit is contained in:
Akira Matsuda 2019-09-05 02:36:33 +09:00
parent 4071115ddd
commit d2f4541f12
1 changed files with 3 additions and 3 deletions

View File

@ -562,13 +562,13 @@ class UrlHelperTest < ActiveSupport::TestCase
def test_current_page_with_escaped_params def test_current_page_with_escaped_params
@request = request_for_url("/category/administra%c3%a7%c3%a3o") @request = request_for_url("/category/administra%c3%a7%c3%a3o")
assert current_page?(controller: "foo", action: "category", category: "administração") assert current_page?({controller: "foo", action: "category", category: "administração"})
end end
def test_current_page_with_escaped_params_with_different_encoding def test_current_page_with_escaped_params_with_different_encoding
@request = request_for_url("/") @request = request_for_url("/")
@request.stub(:path, (+"/category/administra%c3%a7%c3%a3o").force_encoding(Encoding::ASCII_8BIT)) do @request.stub(:path, (+"/category/administra%c3%a7%c3%a3o").force_encoding(Encoding::ASCII_8BIT)) do
assert current_page?(controller: "foo", action: "category", category: "administração") assert current_page?({controller: "foo", action: "category", category: "administração"})
assert current_page?("http://www.example.com/category/administra%c3%a7%c3%a3o") assert current_page?("http://www.example.com/category/administra%c3%a7%c3%a3o")
end end
end end
@ -576,7 +576,7 @@ class UrlHelperTest < ActiveSupport::TestCase
def test_current_page_with_double_escaped_params def test_current_page_with_double_escaped_params
@request = request_for_url("/category/administra%c3%a7%c3%a3o?callback_url=http%3a%2f%2fexample.com%2ffoo") @request = request_for_url("/category/administra%c3%a7%c3%a3o?callback_url=http%3a%2f%2fexample.com%2ffoo")
assert current_page?(controller: "foo", action: "category", category: "administração", callback_url: "http://example.com/foo") assert current_page?({controller: "foo", action: "category", category: "administração", callback_url: "http://example.com/foo"})
end end
def test_current_page_with_trailing_slash def test_current_page_with_trailing_slash