aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/log_subscriber_test.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-29 11:51:32 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-29 11:51:32 -0200
commita35ec0c02235e7e332f8551a6c94c69ac929a1bf (patch)
tree77235d82964272c8721a62ae046b16279d01f945 /actionpack/test/controller/log_subscriber_test.rb
parent069b72aaf04d2caef76f8e71f320716129f2d949 (diff)
parentbaf14ae513337cb185acf865e93dfc48f3aabf6a (diff)
downloadrails-a35ec0c02235e7e332f8551a6c94c69ac929a1bf.tar.gz
rails-a35ec0c02235e7e332f8551a6c94c69ac929a1bf.tar.bz2
rails-a35ec0c02235e7e332f8551a6c94c69ac929a1bf.zip
Merge pull request #18323 from kirs/controller-test-kwargs
Use kwargs in ActionController::TestCase and ActionDispatch::Integration HTTP methods
Diffstat (limited to 'actionpack/test/controller/log_subscriber_test.rb')
-rw-r--r--actionpack/test/controller/log_subscriber_test.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/actionpack/test/controller/log_subscriber_test.rb b/actionpack/test/controller/log_subscriber_test.rb
index 864c6ee130..03a4ad7823 100644
--- a/actionpack/test/controller/log_subscriber_test.rb
+++ b/actionpack/test/controller/log_subscriber_test.rb
@@ -140,7 +140,7 @@ class ACLogSubscriberTest < ActionController::TestCase
end
def test_process_action_with_parameters
- get :show, :id => '10'
+ get :show, params: { id: '10' }
wait
assert_equal 3, logs.size
@@ -148,8 +148,8 @@ class ACLogSubscriberTest < ActionController::TestCase
end
def test_multiple_process_with_parameters
- get :show, :id => '10'
- get :show, :id => '20'
+ get :show, params: { id: '10' }
+ get :show, params: { id: '20' }
wait
@@ -160,7 +160,7 @@ class ACLogSubscriberTest < ActionController::TestCase
def test_process_action_with_wrapped_parameters
@request.env['CONTENT_TYPE'] = 'application/json'
- post :show, :id => '10', :name => 'jose'
+ post :show, params: { id: '10', name: 'jose' }
wait
assert_equal 3, logs.size
@@ -186,7 +186,9 @@ class ACLogSubscriberTest < ActionController::TestCase
def test_process_action_with_filter_parameters
@request.env["action_dispatch.parameter_filter"] = [:lifo, :amount]
- get :show, :lifo => 'Pratik', :amount => '420', :step => '1'
+ get :show, params: {
+ lifo: 'Pratik', amount: '420', step: '1'
+ }
wait
params = logs[1]