diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-08-11 19:19:04 +0300 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2018-08-11 19:19:04 +0300 |
commit | 3a0a8cf60406b53c865e80017daaea3d280030c5 (patch) | |
tree | 1d39139a7195cc20dee7c7f99f0fdf3f6cd896fa /activemodel | |
parent | 09e1452eeba395ce475b087070273e4765dc2fd4 (diff) | |
download | rails-3a0a8cf60406b53c865e80017daaea3d280030c5.tar.gz rails-3a0a8cf60406b53c865e80017daaea3d280030c5.tar.bz2 rails-3a0a8cf60406b53c865e80017daaea3d280030c5.zip |
Fix test failure
```
...
(snip)
............F
Failure:
JsonSerializationTest#test_as_json_should_return_a_hash_if_include_root_
in_json_is_true [/home/travis/build/rails/rails/activemodel/test/cases/serializers/json_serialization_test.rb:145]:
Expected: 2006-08-01 00:00:00 UTC
Actual: "2006-08-01T00:00:00.000Z"
rails test home/travis/build/rails/rails/activemodel/test/cases/serializers/json_serialization_test.rb:136
(snip)
...
```
Related to #31503
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/test/cases/serializers/json_serialization_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/test/cases/serializers/json_serialization_test.rb b/activemodel/test/cases/serializers/json_serialization_test.rb index 6149020d1c..625e0a427a 100644 --- a/activemodel/test/cases/serializers/json_serialization_test.rb +++ b/activemodel/test/cases/serializers/json_serialization_test.rb @@ -142,7 +142,7 @@ class JsonSerializationTest < ActiveModel::TestCase assert_kind_of Hash, json assert_kind_of Hash, json["contact"] %w(name age created_at awesome preferences).each do |field| - assert_equal @contact.send(field), json["contact"][field] + assert_equal @contact.send(field).as_json, json["contact"][field] end ensure Contact.include_root_in_json = original_include_root_in_json |