aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/log_subscriber_test.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2011-05-02 19:21:03 -0500
committerDavid Heinemeier Hansson <david@loudthinking.com>2011-05-02 19:21:03 -0500
commitb359f9fe7cc3f664e145fae7b0d5b5c309587ef8 (patch)
tree386bac9ca264c2355741ba967334030f518b73fa /actionpack/test/controller/log_subscriber_test.rb
parentb29a905f949dbed5052c55184bd5e0838517ec8d (diff)
parent35d0d82ae3edf8fe959624999c858a63b2b4ed52 (diff)
downloadrails-b359f9fe7cc3f664e145fae7b0d5b5c309587ef8.tar.gz
rails-b359f9fe7cc3f664e145fae7b0d5b5c309587ef8.tar.bz2
rails-b359f9fe7cc3f664e145fae7b0d5b5c309587ef8.zip
Merge branch 'master' of github.com:rails/rails
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