diff options
author | Gannon McGibbon <gannon.mcgibbon@gmail.com> | 2018-10-30 15:33:47 -0400 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2018-10-30 17:10:33 -0500 |
commit | 1f7bd2a1711afd71a8a7c5537c677a95fc8978bd (patch) | |
tree | 87c1308f37b9c862e8d88ef06d77c69049af11a4 /activejob/test/cases | |
parent | 6b23b7e78c60ecdff78170d1607350a4fafdb4db (diff) | |
download | rails-1f7bd2a1711afd71a8a7c5537c677a95fc8978bd.tar.gz rails-1f7bd2a1711afd71a8a7c5537c677a95fc8978bd.tar.bz2 rails-1f7bd2a1711afd71a8a7c5537c677a95fc8978bd.zip |
Restore HWIA support to AJ::Arguments.deserialize
Restore HashWithIndifferentAccess support to
ActiveJob::Arguments.deserialize.
Diffstat (limited to 'activejob/test/cases')
-rw-r--r-- | activejob/test/cases/argument_serialization_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activejob/test/cases/argument_serialization_test.rb b/activejob/test/cases/argument_serialization_test.rb index f07529d743..8b2981926f 100644 --- a/activejob/test/cases/argument_serialization_test.rb +++ b/activejob/test/cases/argument_serialization_test.rb @@ -73,6 +73,7 @@ class ArgumentSerializationTest < ActiveSupport::TestCase string_key = { "a" => 1, "_aj_symbol_keys" => [] } another_string_key = { "a" => 1 } indifferent_access = { "a" => 1, "_aj_hash_with_indifferent_access" => true } + indifferent_access_symbol_key = symbol_key.with_indifferent_access assert_equal( { a: 1 }, @@ -90,6 +91,10 @@ class ArgumentSerializationTest < ActiveSupport::TestCase { "a" => 1 }, ActiveJob::Arguments.deserialize([indifferent_access]).first ) + assert_equal( + { a: 1 }, + ActiveJob::Arguments.deserialize([indifferent_access_symbol_key]).first + ) end test "should maintain hash with indifferent access" do |