diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-03 01:03:21 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-03 01:04:57 +0200 |
commit | a55f2de0c5baae589b1730df1e4068f0cd1474ce (patch) | |
tree | 34ea073190afa3287f00cf82408c9766497e5682 /actionpack/test/controller | |
parent | 1afb56f4818381098c6ed0babc4a5899e324e2e5 (diff) | |
download | rails-a55f2de0c5baae589b1730df1e4068f0cd1474ce.tar.gz rails-a55f2de0c5baae589b1730df1e4068f0cd1474ce.tar.bz2 rails-a55f2de0c5baae589b1730df1e4068f0cd1474ce.zip |
Improve performance for filtered parameters and add tests.
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/log_subscriber_test.rb | 11 |
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 |