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.
This commit is contained in:
parent
b71732c84a
commit
1d542e47d1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user