diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-08-15 17:22:30 -0400 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2017-08-15 17:23:52 -0400 |
commit | 11fd246d8f6406aa5165ebf45ca8f17c67716f7e (patch) | |
tree | 34589500ef22c7bbbd868c0567e4695be7a38ff1 /railties | |
parent | c171890a42a641c6d8a1ef32be13e683d5c3e495 (diff) | |
download | rails-11fd246d8f6406aa5165ebf45ca8f17c67716f7e.tar.gz rails-11fd246d8f6406aa5165ebf45ca8f17c67716f7e.tar.bz2 rails-11fd246d8f6406aa5165ebf45ca8f17c67716f7e.zip |
Add test case to make sure Parameters configuration are executed once
Test case for #30045
Diffstat (limited to 'railties')
-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 72942a527c..bc90021cba 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -1191,6 +1191,7 @@ module ApplicationTests app "development" force_lazy_load_hooks { ActionController::Base } + force_lazy_load_hooks { ActionController::API } assert_equal :raise, ActionController::Parameters.action_on_unpermitted_parameters @@ -1202,6 +1203,7 @@ module ApplicationTests app "development" force_lazy_load_hooks { ActionController::Base } + force_lazy_load_hooks { ActionController::API } assert_equal %w(controller action), ActionController::Parameters.always_permitted_parameters end @@ -1214,6 +1216,7 @@ module ApplicationTests app "development" force_lazy_load_hooks { ActionController::Base } + force_lazy_load_hooks { ActionController::API } assert_equal %w( controller action format ), ActionController::Parameters.always_permitted_parameters end @@ -1238,6 +1241,7 @@ module ApplicationTests app "development" force_lazy_load_hooks { ActionController::Base } + force_lazy_load_hooks { ActionController::API } assert_equal :raise, ActionController::Parameters.action_on_unpermitted_parameters @@ -1249,6 +1253,7 @@ module ApplicationTests app "development" force_lazy_load_hooks { ActionController::Base } + force_lazy_load_hooks { ActionController::API } assert_equal :log, ActionController::Parameters.action_on_unpermitted_parameters end @@ -1257,6 +1262,7 @@ module ApplicationTests app "test" force_lazy_load_hooks { ActionController::Base } + force_lazy_load_hooks { ActionController::API } assert_equal :log, ActionController::Parameters.action_on_unpermitted_parameters end @@ -1265,6 +1271,7 @@ module ApplicationTests app "production" force_lazy_load_hooks { ActionController::Base } + force_lazy_load_hooks { ActionController::API } assert_equal false, ActionController::Parameters.action_on_unpermitted_parameters end @@ -1284,6 +1291,7 @@ module ApplicationTests app "development" force_lazy_load_hooks { ActionController::Base } + force_lazy_load_hooks { ActionController::API } assert_equal true, ActionController::Parameters.permit_all_parameters end @@ -1295,6 +1303,7 @@ module ApplicationTests app "development" force_lazy_load_hooks { ActionController::Base } + force_lazy_load_hooks { ActionController::API } assert_equal [], ActionController::Parameters.always_permitted_parameters end @@ -1306,6 +1315,7 @@ module ApplicationTests app "development" force_lazy_load_hooks { ActionController::Base } + force_lazy_load_hooks { ActionController::API } assert_equal :raise, ActionController::Parameters.action_on_unpermitted_parameters end |