diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-05 15:04:15 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-05 15:05:28 -0300 |
commit | 89979ca8ff9dc2c8a8b1ac5ae64e40bae8ce7c50 (patch) | |
tree | 881f47f3b2a2604aaa15fb167b398c4e194d8ea6 /railties/test/application | |
parent | f17a631d79e1f6c78d2f0fbcedddcf267ccf6b8a (diff) | |
download | rails-89979ca8ff9dc2c8a8b1ac5ae64e40bae8ce7c50.tar.gz rails-89979ca8ff9dc2c8a8b1ac5ae64e40bae8ce7c50.tar.bz2 rails-89979ca8ff9dc2c8a8b1ac5ae64e40bae8ce7c50.zip |
Assert config.filter_parameters should be able to be set in a initializer
Diffstat (limited to 'railties/test/application')
-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 e41b21e21a..5b8aa28e50 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -192,6 +192,16 @@ module ApplicationTests end end + test "filter_parameters should be able to set via config.filter_parameters in an initializer" do + app_file 'config/initializers/filter_parameters.rb', <<-RUBY + Rails.application.config.filter_parameters += [ :foo, 'bar' ] + RUBY + + require "#{app_path}/config/environment" + + assert_equal [:password, :foo, 'bar'], Rails.application.env_config['action_dispatch.parameter_filter'] + end + test "config.to_prepare is forwarded to ActionDispatch" do $prepared = false |