aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/log_subscriber_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/log_subscriber_test.rb')
-rw-r--r--actionpack/test/controller/log_subscriber_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/controller/log_subscriber_test.rb b/actionpack/test/controller/log_subscriber_test.rb
index ddfa3df552..5d7a51e902 100644
--- a/actionpack/test/controller/log_subscriber_test.rb
+++ b/actionpack/test/controller/log_subscriber_test.rb
@@ -4,6 +4,8 @@ require "action_controller/log_subscriber"
module Another
class LogSubscribersController < ActionController::Base
+ wrap_parameters :person, :only => :name, :format => :json
+
def show
render :nothing => true
end
@@ -95,6 +97,15 @@ class ACLogSubscriberTest < ActionController::TestCase
assert_equal 'Parameters: {"id"=>"10"}', logs[1]
end
+ def test_process_action_with_wrapped_parameters
+ @request.env['CONTENT_TYPE'] = 'application/json'
+ post :show, :id => '10', :name => 'jose'
+ wait
+
+ assert_equal 3, logs.size
+ assert_match '"person"=>{"name"=>"jose"}', logs[1]
+ end
+
def test_process_action_with_view_runtime
get :show
wait