Skip to content

Commit

Permalink
Passing in a Hash instance as non-kwargs parameters has to be curly b…
Browse files Browse the repository at this point in the history
…raced now
  • Loading branch information
amatsuda committed Sep 5, 2019
1 parent 4071115 commit d2f4541
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions actionview/test/template/url_helper_test.rb
Expand Up @@ -562,21 +562,21 @@ def test_current_page_with_scope_that_match
def test_current_page_with_escaped_params
@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

def test_current_page_with_escaped_params_with_different_encoding
@request = request_for_url("/")
@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")
end
end

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")

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

def test_current_page_with_trailing_slash
Expand Down

0 comments on commit d2f4541

Please sign in to comment.