1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Auto-correct rubocop offences

This commit is contained in:
Ryuta Kamizono 2019-09-05 15:46:58 +09:00
parent 2489a5939d
commit 0cf609661e
2 changed files with 4 additions and 6 deletions

View file

@ -562,13 +562,13 @@ class UrlHelperTest < ActiveSupport::TestCase
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
@ -576,7 +576,7 @@ class UrlHelperTest < ActiveSupport::TestCase
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

View file

@ -127,9 +127,7 @@ module ActiveRecord
end
else
# Returns the number of threads currently waiting on this queue.
def num_waiting
@num_waiting
end
attr_reader :num_waiting
end
# Add +element+ to the queue. Never blocks.