diff options
author | Prem Sichanugrist <s@sikachu.com> | 2011-04-28 15:56:11 +0700 |
---|---|---|
committer | Prem Sichanugrist <s@sikachu.com> | 2011-05-03 03:21:43 +0700 |
commit | 8c9e4d520291871e5319bc0e0a890527d8aea099 (patch) | |
tree | d6733837636fe79992e5deb9702b65f98c7cdd6a /railties/test | |
parent | 23eb81a3d1eb154a3aefe569408d1bb2ed63c554 (diff) | |
download | rails-8c9e4d520291871e5319bc0e0a890527d8aea099.tar.gz rails-8c9e4d520291871e5319bc0e0a890527d8aea099.tar.bz2 rails-8c9e4d520291871e5319bc0e0a890527d8aea099.zip |
Add `ActionController::ParamsWrapper` to wrap parameters into a nested hash
This will allow us to do a rootless JSON/XML request to server.
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/configuration_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index ab3eb4c9e7..8f96f4c57b 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -432,5 +432,15 @@ module ApplicationTests get "/" assert_equal 'true', last_response.body end + + test "config.action_controller.wrap_parameters is set in ActionController::Base" do + app_file 'config/initializers/wrap_parameters.rb', <<-RUBY + ActionController::Base.wrap_parameters :format => [:json] + RUBY + require "#{app_path}/config/environment" + require 'action_controller/base' + + assert_equal [:json], ActionController::Base._wrapper_options[:format] + end end end |