mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Update test_includes_linked_comments with correct expected result
This commit is contained in:
parent
f2ee544a88
commit
f4eb33d6e9
@ -34,8 +34,9 @@ module ActiveModel
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_includes_linked_comments
|
def test_includes_linked_comments
|
||||||
assert_equal([{ id: '1', body: "ZOMG A COMMENT", links: { post: @post.id.to_s, author: nil }},
|
# If CommentPreviewSerializer is applied correctly the body text will not be present in the output
|
||||||
{ id: '2', body: "ZOMG ANOTHER COMMENT", links: { post: @post.id.to_s, author: nil }}],
|
assert_equal([{ id: '1', links: { post: @post.id.to_s}},
|
||||||
|
{ id: '2', links: { post: @post.id.to_s}}],
|
||||||
@adapter.serializable_hash[:linked][:comments])
|
@adapter.serializable_hash[:linked][:comments])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user