Make bencharked model names reflect relationships; fix expected response

This commit is contained in:
Benjamin Fleischer
2016-06-07 21:36:16 -05:00
parent 3d9ab37ffa
commit af368af53e
4 changed files with 118 additions and 108 deletions

View File

@@ -66,25 +66,25 @@ class ApiAssertion
def expected
@expected ||=
{
'post' => {
'id' => 1337,
'title' => 'New Post',
'primary_resource' => {
'id' => 1337,
'title' => 'New PrimaryResource',
'body' => 'Body',
'comments' => [
{
'id' => 1,
'body' => 'ZOMG A COMMENT'
}
],
'blog' => {
'id' => 999,
'name' => 'Custom blog'
'virtual_attribute' => {
'id' => 999,
'name' => 'Free-Range Virtual Attribute'
},
'author' => {
'has_one_relationship' => {
'id' => 42,
'first_name' => 'Joao',
'last_name' => 'Moura'
}
},
'has_many_relationships' => [
{
'id' => 1,
'body' => 'ZOMG A HAS MANY RELATIONSHIP'
}
]
}
}
end