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:
parent
f17a631d79
commit
89979ca8ff
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue