提交 1d542e47 编写于 作者: K Kasper Timm Hansen

Set `always_permitted_parameters`.

The tests were written with the common false value seen in Rails apps,
show that intent in the code.

Should also fix the build on 5-0-stable.
上级 b71732c8
......@@ -3,6 +3,15 @@
require 'active_support/core_ext/string/strip'
class ParametersSerializationTest < ActiveSupport::TestCase
setup do
@old_permitted_parameters = ActionController::Parameters.always_permitted_parameters
ActionController::Parameters.always_permitted_parameters = true
end
teardown do
ActionController::Parameters.always_permitted_parameters = @old_permitted_parameters
end
test 'yaml serialization' do
assert_equal <<-end_of_yaml.strip_heredoc, YAML.dump(ActionController::Parameters.new(key: :value))
--- !ruby/object:ActionController::Parameters
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册