mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Use symbol for root in jsonapi, fix tests
This commit is contained in:
@@ -28,7 +28,7 @@ module ActiveModel
|
||||
assert_equal([
|
||||
{ title: "Hello!!", body: "Hello, world!!", id: "1", links: { comments: [], blog: "999", author: "1" } },
|
||||
{ title: "New Post", body: "Body", id: "2", links: { comments: [], blog: "999", author: "1" } }
|
||||
], @adapter.serializable_hash[:posts])
|
||||
], @adapter.serializable_hash[:data])
|
||||
end
|
||||
|
||||
def test_limiting_fields
|
||||
@@ -36,7 +36,7 @@ module ActiveModel
|
||||
assert_equal([
|
||||
{ title: "Hello!!", links: { comments: [], blog: "999", author: "1" } },
|
||||
{ title: "New Post", links: { comments: [], blog: "999", author: "1" } }
|
||||
], @adapter.serializable_hash[:posts])
|
||||
], @adapter.serializable_hash[:data])
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user