aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/integration_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-29 12:19:41 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-29 12:19:41 -0200
commitbb6fe7e73a96ac6a9130ed2a68a606ed5f5fb881 (patch)
tree0c5cb14d159ae2476a518e0b64f5c9f7804c932f /actionpack/test/controller/integration_test.rb
parent7814f901e1ec0cc3228914f60bd340922f98d94f (diff)
downloadrails-bb6fe7e73a96ac6a9130ed2a68a606ed5f5fb881.tar.gz
rails-bb6fe7e73a96ac6a9130ed2a68a606ed5f5fb881.tar.bz2
rails-bb6fe7e73a96ac6a9130ed2a68a606ed5f5fb881.zip
Consistent usage of spaces in hashes across our codebase
Diffstat (limited to 'actionpack/test/controller/integration_test.rb')
-rw-r--r--actionpack/test/controller/integration_test.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index 7bda5ccfe1..a5b246e7ad 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -38,7 +38,7 @@ class SessionTest < ActiveSupport::TestCase
end
def test_deprecated_request_via_redirect_uses_given_method
- path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue"}
+ path = "/somepath"; args = { id: '1' }; headers = { "X-Test-Header" => "testvalue" }
@session.expects(:process).with(:put, path, params: args, headers: headers)
@session.stubs(:redirect?).returns(false)
assert_deprecated { @session.request_via_redirect(:put, path, args, headers) }
@@ -65,7 +65,7 @@ class SessionTest < ActiveSupport::TestCase
end
def test_deprecated_get_via_redirect
- path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
+ path = "/somepath"; args = { id: '1' }; headers = { "X-Test-Header" => "testvalue" }
@session.expects(:request_via_redirect).with(:get, path, args, headers)
assert_deprecated do
@@ -80,7 +80,7 @@ class SessionTest < ActiveSupport::TestCase
end
def test_deprecated_post_via_redirect
- path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
+ path = "/somepath"; args = { id: '1' }; headers = { "X-Test-Header" => "testvalue" }
@session.expects(:request_via_redirect).with(:post, path, args, headers)
assert_deprecated do
@@ -95,7 +95,7 @@ class SessionTest < ActiveSupport::TestCase
end
def test_deprecated_patch_via_redirect
- path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
+ path = "/somepath"; args = { id: '1' }; headers = { "X-Test-Header" => "testvalue" }
@session.expects(:request_via_redirect).with(:patch, path, args, headers)
assert_deprecated do
@@ -110,7 +110,7 @@ class SessionTest < ActiveSupport::TestCase
end
def test_deprecated_put_via_redirect
- path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
+ path = "/somepath"; args = { id: '1' }; headers = { "X-Test-Header" => "testvalue" }
@session.expects(:request_via_redirect).with(:put, path, args, headers)
assert_deprecated do
@@ -125,7 +125,7 @@ class SessionTest < ActiveSupport::TestCase
end
def test_deprecated_delete_via_redirect
- path = "/somepath"; args = {:id => '1'}; headers = {"X-Test-Header" => "testvalue" }
+ path = "/somepath"; args = { id: '1' }; headers = { "X-Test-Header" => "testvalue" }
@session.expects(:request_via_redirect).with(:delete, path, args, headers)
assert_deprecated do
@@ -763,7 +763,7 @@ class MetalIntegrationTest < ActionDispatch::IntegrationTest
end
def test_pass_headers_and_env
- get "/success", headers: {"X-Test-Header" => "value"}, env: {"HTTP_REFERER" => "http://test.com/", "HTTP_HOST" => "http://test.com"}
+ get "/success", headers: { "X-Test-Header" => "value" }, env: { "HTTP_REFERER" => "http://test.com/", "HTTP_HOST" => "http://test.com" }
assert_equal "http://test.com", @request.env["HTTP_HOST"]
assert_equal "http://test.com/", @request.env["HTTP_REFERER"]
@@ -771,7 +771,7 @@ class MetalIntegrationTest < ActionDispatch::IntegrationTest
end
def test_pass_env
- get "/success", env: {"HTTP_REFERER" => "http://test.com/", "HTTP_HOST" => "http://test.com"}
+ get "/success", env: { "HTTP_REFERER" => "http://test.com/", "HTTP_HOST" => "http://test.com" }
assert_equal "http://test.com", @request.env["HTTP_HOST"]
assert_equal "http://test.com/", @request.env["HTTP_REFERER"]
@@ -891,7 +891,7 @@ class EnvironmentFilterIntegrationTest < ActionDispatch::IntegrationTest
end
test "filters rack request form vars" do
- post "/post", params: {username: 'cjolly', password: 'secret'}
+ post "/post", params: { username: 'cjolly', password: 'secret' }
assert_equal 'cjolly', request.filtered_parameters['username']
assert_equal '[FILTERED]', request.filtered_parameters['password']