mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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
This commit is contained in:
parent
09e1452eeb
commit
3a0a8cf604
1 changed files with 1 additions and 1 deletions
|
@ -142,7 +142,7 @@ class JsonSerializationTest < ActiveModel::TestCase
|
||||||
assert_kind_of Hash, json
|
assert_kind_of Hash, json
|
||||||
assert_kind_of Hash, json["contact"]
|
assert_kind_of Hash, json["contact"]
|
||||||
%w(name age created_at awesome preferences).each do |field|
|
%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
|
end
|
||||||
ensure
|
ensure
|
||||||
Contact.include_root_in_json = original_include_root_in_json
|
Contact.include_root_in_json = original_include_root_in_json
|
||||||
|
|
Loading…
Reference in a new issue