diff options
author | José Valim <jose.valim@gmail.com> | 2011-05-19 07:51:11 -0700 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-05-19 07:51:11 -0700 |
commit | bcdb68155a516ae9e80ddb9d58bf1adfbf63c9f1 (patch) | |
tree | eeae7646be8593832d47e40100f7526cc23b04e9 /actionpack/test | |
parent | 4cf4c7f4543f31d88793a4c9ead30161b7263bf2 (diff) | |
parent | 968596fa7f2cd3218f8361a1ef19b666439ce142 (diff) | |
download | rails-bcdb68155a516ae9e80ddb9d58bf1adfbf63c9f1.tar.gz rails-bcdb68155a516ae9e80ddb9d58bf1adfbf63c9f1.tar.bz2 rails-bcdb68155a516ae9e80ddb9d58bf1adfbf63c9f1.zip |
Merge pull request #1151 from joshk/wrap_params_options_change
renamed the wrap_parameters :only and :except options to :include and :ex
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/log_subscriber_test.rb | 6 | ||||
-rw-r--r-- | actionpack/test/controller/params_wrapper_test.rb | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/actionpack/test/controller/log_subscriber_test.rb b/actionpack/test/controller/log_subscriber_test.rb index 5d7a51e902..80c4fa2ee5 100644 --- a/actionpack/test/controller/log_subscriber_test.rb +++ b/actionpack/test/controller/log_subscriber_test.rb @@ -4,7 +4,7 @@ require "action_controller/log_subscriber" module Another class LogSubscribersController < ActionController::Base - wrap_parameters :person, :only => :name, :format => :json + wrap_parameters :person, :include => :name, :format => :json def show render :nothing => true @@ -34,11 +34,11 @@ module Another cache_page("Super soaker", "/index.html") render :nothing => true end - + def with_exception raise Exception end - + end end diff --git a/actionpack/test/controller/params_wrapper_test.rb b/actionpack/test/controller/params_wrapper_test.rb index a50065bcc7..7bef1e8d5d 100644 --- a/actionpack/test/controller/params_wrapper_test.rb +++ b/actionpack/test/controller/params_wrapper_test.rb @@ -65,9 +65,9 @@ class ParamsWrapperTest < ActionController::TestCase end end - def test_specify_only_option + def test_specify_include_option with_default_wrapper_options do - UsersController.wrap_parameters :only => :username + UsersController.wrap_parameters :include => :username @request.env['CONTENT_TYPE'] = 'application/json' post :parse, { 'username' => 'sikachu', 'title' => 'Developer' } @@ -75,9 +75,9 @@ class ParamsWrapperTest < ActionController::TestCase end end - def test_specify_except_option + def test_specify_exclude_option with_default_wrapper_options do - UsersController.wrap_parameters :except => :title + UsersController.wrap_parameters :exclude => :title @request.env['CONTENT_TYPE'] = 'application/json' post :parse, { 'username' => 'sikachu', 'title' => 'Developer' } @@ -85,9 +85,9 @@ class ParamsWrapperTest < ActionController::TestCase end end - def test_specify_both_wrapper_name_and_only_option + def test_specify_both_wrapper_name_and_include_option with_default_wrapper_options do - UsersController.wrap_parameters :person, :only => :username + UsersController.wrap_parameters :person, :include => :username @request.env['CONTENT_TYPE'] = 'application/json' post :parse, { 'username' => 'sikachu', 'title' => 'Developer' } |