diff options
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 |