mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Extended format for JSONAPI include option.
This commit is contained in:
@@ -42,7 +42,7 @@ module ActiveModel
|
||||
end
|
||||
|
||||
def test_includes_linked_comments
|
||||
@adapter = ActiveModel::Serializer::Adapter::JsonApi.new(@serializer, include: 'comments')
|
||||
@adapter = ActiveModel::Serializer::Adapter::JsonApi.new(@serializer, include: [:comments])
|
||||
expected = [{
|
||||
id: '1',
|
||||
type: 'comments',
|
||||
@@ -68,7 +68,7 @@ module ActiveModel
|
||||
end
|
||||
|
||||
def test_limit_fields_of_linked_comments
|
||||
@adapter = ActiveModel::Serializer::Adapter::JsonApi.new(@serializer, include: 'comments', fields: { comment: [:id] })
|
||||
@adapter = ActiveModel::Serializer::Adapter::JsonApi.new(@serializer, include: [:comments], fields: { comment: [:id] })
|
||||
expected = [{
|
||||
id: '1',
|
||||
type: 'comments',
|
||||
|
||||
Reference in New Issue
Block a user