mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
Switch back to the old hash syntax
Just fixed up a couple of hash literals in the tests so that the build passes for 1.8.7
This commit is contained in:
parent
bfb6a8895a
commit
ef6ab5f0c0
@ -428,7 +428,7 @@ class SerializerTest < ActiveModel::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
post = Post.new(title: "My Post")
|
post = Post.new(:title => "My Post")
|
||||||
comments = [Comment.new(:title => "Comment1", :id => 1), Comment.new(:title => "Comment2", :id => 2)]
|
comments = [Comment.new(:title => "Comment1", :id => 1), Comment.new(:title => "Comment2", :id => 2)]
|
||||||
post.comments = comments
|
post.comments = comments
|
||||||
|
|
||||||
@ -439,8 +439,8 @@ class SerializerTest < ActiveModel::TestCase
|
|||||||
end
|
end
|
||||||
json = post_serializer.new(post).as_json
|
json = post_serializer.new(post).as_json
|
||||||
assert_equal({
|
assert_equal({
|
||||||
title: "My Post",
|
:title => "My Post",
|
||||||
comment_ids: [1]
|
:comment_ids => [1]
|
||||||
}, json)
|
}, json)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user