aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--actionpack/test/controller/parameters/serialization_test.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/actionpack/test/controller/parameters/serialization_test.rb b/actionpack/test/controller/parameters/serialization_test.rb
index 4fb1564c68..6fba2fde91 100644
--- a/actionpack/test/controller/parameters/serialization_test.rb
+++ b/actionpack/test/controller/parameters/serialization_test.rb
@@ -14,12 +14,10 @@ class ParametersSerializationTest < ActiveSupport::TestCase
test "yaml serialization" do
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
- permitted: false
- end_of_yaml
+ yaml_dump = YAML.dump(params)
+ assert_match("--- !ruby/object:ActionController::Parameters", yaml_dump)
+ assert_match(/parameters: !ruby\/hash:ActiveSupport::HashWithIndifferentAccess\n\s+key: :value/, yaml_dump)
+ assert_match("permitted: false", yaml_dump)
end
test "yaml deserialization" do