spec/serializer_spec.rb in jsonapi-serializers-0.2.0 vs spec/serializer_spec.rb in jsonapi-serializers-0.2.1
- old
+ new
@@ -41,17 +41,17 @@
'self' => '/long-comments/1',
},
'relationships' => {
'user' => {
'links' => {
- 'self' => '/long-comments/1/links/user',
+ 'self' => '/long-comments/1/relationships/user',
'related' => '/long-comments/1/user',
},
},
'post' => {
'links' => {
- 'self' => '/long-comments/1/links/post',
+ 'self' => '/long-comments/1/relationships/post',
'related' => '/long-comments/1/post',
},
},
},
})
@@ -94,17 +94,17 @@
},
'relationships' => {
# Both to-one and to-many links are present, but neither include linkage:
'author' => {
'links' => {
- 'self' => '/posts/1/links/author',
+ 'self' => '/posts/1/relationships/author',
'related' => '/posts/1/author',
},
},
'long-comments' => {
'links' => {
- 'self' => '/posts/1/links/long-comments',
+ 'self' => '/posts/1/relationships/long-comments',
'related' => '/posts/1/long-comments',
},
},
},
})
@@ -129,21 +129,21 @@
'self' => '/posts/1',
},
'relationships' => {
'author' => {
'links' => {
- 'self' => '/posts/1/links/author',
+ 'self' => '/posts/1/relationships/author',
'related' => '/posts/1/author',
},
# Spec: Resource linkage MUST be represented as one of the following:
# - null for empty to-one relationships.
# http://jsonapi.org/format/#document-structure-resource-relationships
'data' => nil,
},
'long-comments' => {
'links' => {
- 'self' => '/posts/1/links/long-comments',
+ 'self' => '/posts/1/relationships/long-comments',
'related' => '/posts/1/long-comments',
},
'data' => [],
},
},
@@ -167,11 +167,11 @@
'self' => '/posts/1',
},
'relationships' => {
'author' => {
'links' => {
- 'self' => '/posts/1/links/author',
+ 'self' => '/posts/1/relationships/author',
'related' => '/posts/1/author',
},
# Spec: Resource linkage MUST be represented as one of the following:
# - a 'linkage object' (defined below) for non-empty to-one relationships.
# http://jsonapi.org/format/#document-structure-resource-relationships
@@ -180,11 +180,11 @@
'id' => '1',
},
},
'long-comments' => {
'links' => {
- 'self' => '/posts/1/links/long-comments',
+ 'self' => '/posts/1/relationships/long-comments',
'related' => '/posts/1/long-comments',
},
'data' => [],
},
},
@@ -208,18 +208,18 @@
'self' => '/posts/1',
},
'relationships' => {
'author' => {
'links' => {
- 'self' => '/posts/1/links/author',
+ 'self' => '/posts/1/relationships/author',
'related' => '/posts/1/author',
},
'data' => nil,
},
'long-comments' => {
'links' => {
- 'self' => '/posts/1/links/long-comments',
+ 'self' => '/posts/1/relationships/long-comments',
'related' => '/posts/1/long-comments',
},
# Spec: Resource linkage MUST be represented as one of the following:
# - an empty array ([]) for empty to-many relationships.
# http://jsonapi.org/format/#document-structure-resource-relationships
@@ -247,17 +247,17 @@
'self' => '/posts/1',
},
'relationships' => {
'author' => {
'links' => {
- 'self' => '/posts/1/links/author',
+ 'self' => '/posts/1/relationships/author',
'related' => '/posts/1/author',
},
'data' => nil,
},
'long-comments' => {
'links' => {
- 'self' => '/posts/1/links/long-comments',
+ 'self' => '/posts/1/relationships/long-comments',
'related' => '/posts/1/long-comments',
},
# Spec: Resource linkage MUST be represented as one of the following:
# - an array of linkage objects for non-empty to-many relationships.
# http://jsonapi.org/format/#document-structure-resource-relationships
\ No newline at end of file