Implement included and id and type as per spec

This commit is contained in:
Mateo Murphy
2015-03-20 16:04:33 -04:00
parent d82c599c68
commit 33f3a88ba0
12 changed files with 203 additions and 130 deletions

View File

@@ -27,9 +27,10 @@ module ActiveModel
def test_include_multiple_posts
expected = [
{
id: "1",
type: "posts",
title: "Hello!!",
body: "Hello, world!!",
id: "1",
links: {
comments: { linkage: [] },
blog: { linkage: { type: "blogs", id: "999" } },
@@ -37,9 +38,10 @@ module ActiveModel
}
},
{
id: "2",
type: "posts",
title: "New Post",
body: "Body",
id: "2",
links: {
comments: { linkage: [] },
blog: { linkage: { type: "blogs", id: "999" } },
@@ -56,6 +58,8 @@ module ActiveModel
expected = [
{
id: "1",
type: "posts",
title: "Hello!!",
links: {
comments: { linkage: [] },
@@ -64,6 +68,8 @@ module ActiveModel
}
},
{
id: "2",
type: "posts",
title: "New Post",
links: {
comments: { linkage: [] },