aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2017-07-17 13:47:14 -0500
committerGitHub <noreply@github.com>2017-07-17 13:47:14 -0500
commitdc6cab9559a9403c3015683391c7bc70570358ef (patch)
tree6ba08cbc9baab7dc80bcf14b92556dd6a940aa3c
parenta3d704bd112e15569b1493825204c97cb0624e04 (diff)
parenta5faf6fb7279ebd1fab92d51bcc705469b7b98d9 (diff)
downloadrails-dc6cab9559a9403c3015683391c7bc70570358ef.tar.gz
rails-dc6cab9559a9403c3015683391c7bc70570358ef.tar.bz2
rails-dc6cab9559a9403c3015683391c7bc70570358ef.zip
Merge pull request #25564 from brewski/serializable_hash_fix
Correctly handle frozen options for ActiveRecord::Serialization#seria…
-rw-r--r--activerecord/test/cases/json_serialization_test.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/activerecord/test/cases/json_serialization_test.rb b/activerecord/test/cases/json_serialization_test.rb
index 9b4b61b16e..a6ea27bf48 100644
--- a/activerecord/test/cases/json_serialization_test.rb
+++ b/activerecord/test/cases/json_serialization_test.rb
@@ -160,10 +160,8 @@ class JsonSerializationTest < ActiveRecord::TestCase
end
def test_serializable_hash_should_not_modify_options_in_argument
- options = { only: :name }
- @contact.serializable_hash(options)
-
- assert_nil options[:except]
+ options = { only: :name }.freeze
+ assert_nothing_raised { @contact.serializable_hash(options) }
end
end