Skip to content

Commit fce59f3

Browse files
committed
Test ommision of relationships by fieldset.
1 parent 33dcb97 commit fce59f3

1 file changed

Lines changed: 1 addition & 37 deletions

File tree

test/unit/serializer/serializer_test.rb

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,18 +1027,6 @@ def test_serializer_array_of_resources_limited_fields
10271027
},
10281028
links: {
10291029
self: '/posts/1'
1030-
},
1031-
relationships: {
1032-
author: {
1033-
links: {
1034-
self: '/posts/1/relationships/author',
1035-
related: '/posts/1/author'
1036-
},
1037-
data: {
1038-
type: 'people',
1039-
id: '1'
1040-
}
1041-
}
10421030
}
10431031
},
10441032
{
@@ -1049,18 +1037,6 @@ def test_serializer_array_of_resources_limited_fields
10491037
},
10501038
links: {
10511039
self: '/posts/2'
1052-
},
1053-
relationships: {
1054-
author: {
1055-
links: {
1056-
self: '/posts/2/relationships/author',
1057-
related: '/posts/2/author'
1058-
},
1059-
data: {
1060-
type: 'people',
1061-
id: '1'
1062-
}
1063-
}
10641040
}
10651041
}
10661042
],
@@ -1073,18 +1049,6 @@ def test_serializer_array_of_resources_limited_fields
10731049
},
10741050
links: {
10751051
self: '/posts/11'
1076-
},
1077-
relationships: {
1078-
author: {
1079-
links: {
1080-
self: '/posts/11/relationships/author',
1081-
related: '/posts/11/author'
1082-
},
1083-
data: {
1084-
type: 'people',
1085-
id: '1'
1086-
}
1087-
}
10881052
}
10891053
},
10901054
{
@@ -1217,7 +1181,7 @@ def test_serializer_array_of_resources_limited_fields
12171181
include: ['comments', 'author', 'comments.tags', 'author.posts'],
12181182
fields: {
12191183
people: [:id, :email, :comments],
1220-
posts: [:id, :title, :author],
1184+
posts: [:id, :title],
12211185
tags: [:name],
12221186
comments: [:id, :body, :post]
12231187
}).serialize_to_hash(posts)

0 commit comments

Comments
 (0)