diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2017-07-17 13:47:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 13:47:14 -0500 |
commit | dc6cab9559a9403c3015683391c7bc70570358ef (patch) | |
tree | 6ba08cbc9baab7dc80bcf14b92556dd6a940aa3c | |
parent | a3d704bd112e15569b1493825204c97cb0624e04 (diff) | |
parent | a5faf6fb7279ebd1fab92d51bcc705469b7b98d9 (diff) | |
download | rails-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.rb | 6 |
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 |