1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Assert config.filter_parameters should be able to be set in a initializer

This commit is contained in:
Rafael Mendonça França 2013-01-05 15:04:15 -03:00
parent f17a631d79
commit 89979ca8ff

View file

@ -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