diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-05 06:38:27 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-05 06:39:51 -0300 |
commit | 1401f96492d7fc7ea0688c1d4b7f0232d2f34eb6 (patch) | |
tree | fcbbe9e8acabbaca38e866c5c9eb8a36a2479624 /railties/test | |
parent | 58f52677e8f1ea37b91a6c5d9028f93b1a36ea54 (diff) | |
download | rails-1401f96492d7fc7ea0688c1d4b7f0232d2f34eb6.tar.gz rails-1401f96492d7fc7ea0688c1d4b7f0232d2f34eb6.tar.bz2 rails-1401f96492d7fc7ea0688c1d4b7f0232d2f34eb6.zip |
Rename the configuration to raise_on_unpermitted_parameters
Also changed the exception to UnpermittedParameters
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/configuration_test.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index ab0ab2f401..6066253003 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -567,7 +567,7 @@ module ApplicationTests assert_equal 'permitted', last_response.body end - test "config.action_controller.raise_on_unexpected_params = true" do + test "config.action_controller.raise_on_unpermitted_parameters = true" do app_file 'app/controllers/posts_controller.rb', <<-RUBY class PostsController < ActionController::Base def create @@ -580,39 +580,39 @@ module ApplicationTests routes.prepend do resources :posts end - config.action_controller.raise_on_unexpected_params = true + config.action_controller.raise_on_unpermitted_parameters = true RUBY require "#{app_path}/config/environment" - assert_equal true, ActionController::Parameters.raise_on_unexpected + assert_equal true, ActionController::Parameters.raise_on_unpermitted_parameters post "/posts", {post: {"title" =>"zomg"}} assert_match /We're sorry, but something went wrong/, last_response.body end - test "config.action_controller.raise_on_unexpected_params is true by default on development" do + test "config.action_controller.raise_on_unpermitted_parameters is true by default on development" do ENV["RAILS_ENV"] = "development" require "#{app_path}/config/environment" - assert_equal true, ActionController::Parameters.raise_on_unexpected + assert_equal true, ActionController::Parameters.raise_on_unpermitted_parameters end - test "config.action_controller.raise_on_unexpected_params is true by defaul on test" do + test "config.action_controller.raise_on_unpermitted_parameters is true by defaul on test" do ENV["RAILS_ENV"] = "test" require "#{app_path}/config/environment" - assert_equal true, ActionController::Parameters.raise_on_unexpected + assert_equal true, ActionController::Parameters.raise_on_unpermitted_parameters end - test "config.action_controller.raise_on_unexpected_params is false by default on production" do + test "config.action_controller.raise_on_unpermitted_parameters is false by default on production" do ENV["RAILS_ENV"] = "production" require "#{app_path}/config/environment" - assert_equal false, ActionController::Parameters.raise_on_unexpected + assert_equal false, ActionController::Parameters.raise_on_unpermitted_parameters end test "config.action_dispatch.ignore_accept_header" do |