diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-08-18 16:39:31 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-08-18 16:40:21 -0500 |
commit | 99e33c03b7ccad3254c787a19bc7082e23dbcd27 (patch) | |
tree | d4dfc0fc5b07568dec9502db6721857acdcc1bce | |
parent | 131a2f0fdeb618ab2876712c30d6d3377af18f7f (diff) | |
download | rails-99e33c03b7ccad3254c787a19bc7082e23dbcd27.tar.gz rails-99e33c03b7ccad3254c787a19bc7082e23dbcd27.tar.bz2 rails-99e33c03b7ccad3254c787a19bc7082e23dbcd27.zip |
Dont' check for any order in hash since we aren't sorting it and this is determinated only by the used interpreter
-rw-r--r-- | activemodel/test/cases/serializers/json_serialization_test.rb | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/activemodel/test/cases/serializers/json_serialization_test.rb b/activemodel/test/cases/serializers/json_serialization_test.rb index 00a636e633..e4f5e61e91 100644 --- a/activemodel/test/cases/serializers/json_serialization_test.rb +++ b/activemodel/test/cases/serializers/json_serialization_test.rb @@ -155,17 +155,6 @@ class JsonSerializationTest < ActiveModel::TestCase end end - test "as_json should keep the default order in the hash according to used engine" do - json = @contact.as_json - - # Check for original order only on MRI and sort for other implementations - if RUBY_ENGINE == 'ruby' - assert_equal %w(name age created_at awesome preferences), json.keys - else - assert_equal %w(age awesome created_at name preferences), json.keys.sort - end - end - test "from_json should work without a root (class attribute)" do json = @contact.to_json result = Contact.new.from_json(json) |