diff options
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index c01065932a..92d323f292 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -1933,7 +1933,7 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest post :preview, on: :new end - resource :admin, path_names: { new: "novo" }, path: "administrador" do + resource :admin, path_names: { new: "novo" }, path: "administrador" do post :preview, on: :new end @@ -3736,7 +3736,7 @@ private https!(old_https) end - def verify_redirect(url, status=301) + def verify_redirect(url, status = 301) assert_equal status, @response.status assert_equal url, @response.headers["Location"] assert_equal expected_redirect_body(url), @response.body @@ -4163,7 +4163,7 @@ class TestRedirectInterpolation < ActionDispatch::IntegrationTest end private - def verify_redirect(url, status=301) + def verify_redirect(url, status = 301) assert_equal status, @response.status assert_equal url, @response.headers["Location"] assert_equal expected_redirect_body(url), @response.body @@ -4696,15 +4696,15 @@ class TestUrlGenerationErrors < ActionDispatch::IntegrationTest end test "url helpers raise message with mixed parameters when generation fails" do - url, missing = { action: "show", controller: "products", id: nil, "id"=>"url-tested" }, [:id] + url, missing = { action: "show", controller: "products", id: nil, "id" => "url-tested" }, [:id] message = "No route matches #{url.inspect}, possible unmatched constraints: #{missing.inspect}" # Optimized url helper - error = assert_raises(ActionController::UrlGenerationError) { product_path(nil, "id"=>"url-tested") } + error = assert_raises(ActionController::UrlGenerationError) { product_path(nil, "id" => "url-tested") } assert_equal message, error.message # Non-optimized url helper - error = assert_raises(ActionController::UrlGenerationError, message) { product_path(id: nil, "id"=>"url-tested") } + error = assert_raises(ActionController::UrlGenerationError, message) { product_path(id: nil, "id" => "url-tested") } assert_equal message, error.message end end |