mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix wrong assignment.
Screwed up both the left and right hand sides!
This commit is contained in:
parent
1d542e47d1
commit
70b995a77f
1 changed files with 5 additions and 4 deletions
|
@ -4,16 +4,17 @@ 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
|
||||
@old_permitted_parameters = ActionController::Parameters.permit_all_parameters
|
||||
ActionController::Parameters.permit_all_parameters = false
|
||||
end
|
||||
|
||||
teardown do
|
||||
ActionController::Parameters.always_permitted_parameters = @old_permitted_parameters
|
||||
ActionController::Parameters.permit_all_parameters = @old_permitted_parameters
|
||||
end
|
||||
|
||||
test 'yaml serialization' do
|
||||
assert_equal <<-end_of_yaml.strip_heredoc, YAML.dump(ActionController::Parameters.new(key: :value))
|
||||
params = ActionController::Parameters.new(key: :value)
|
||||
assert_equal <<-end_of_yaml.strip_heredoc, YAML.dump(params)
|
||||
--- !ruby/object:ActionController::Parameters
|
||||
parameters: !ruby/hash:ActiveSupport::HashWithIndifferentAccess
|
||||
key: :value
|
||||
|
|
Loading…
Reference in a new issue