@@ -708,7 +708,10 @@ def read_attribute_for_validation(attr)
708708 long_comments . each { |c | c . post = post }
709709
710710 expected_data = {
711- 'data' => serialize_primary ( post , { serializer : MyApp ::PostSerializer } ) ,
711+ 'data' => serialize_primary ( post , {
712+ serializer : MyApp ::PostSerializer ,
713+ include_linkages : [ 'long-comments' ]
714+ } ) ,
712715 'included' => [
713716 # Intermediates are included: long-comments, long-comments.post, and long-comments.post.author
714717 # http://jsonapi.org/format/#document-structure-compound-documents
@@ -745,7 +748,10 @@ def read_attribute_for_validation(attr)
745748 long_comments . each { |c | c . post = post }
746749
747750 expected_data = {
748- 'data' => serialize_primary ( post , { serializer : MyApp ::PostSerializer } ) ,
751+ 'data' => serialize_primary ( post , {
752+ serializer : MyApp ::PostSerializer ,
753+ include_linkages : [ 'long-comments' ]
754+ } ) ,
749755 'included' => [
750756 serialize_primary ( first_comment , {
751757 serializer : MyApp ::LongCommentSerializer ,
@@ -788,7 +794,7 @@ def read_attribute_for_validation(attr)
788794 serialize_primary ( comment_user , { serializer : MyAppOtherNamespace ::UserSerializer } ) ,
789795 ] ,
790796 }
791- includes = [ 'long-comments' , 'long-comments .user']
797+ includes = [ 'long-comments.user' ]
792798 actual_data = JSONAPI ::Serializer . serialize ( post , include : includes )
793799
794800 # Multiple expectations for better diff output for debugging.
@@ -826,7 +832,7 @@ def read_attribute_for_validation(attr)
826832 ] ,
827833 }
828834 # Also test that it handles string include arguments.
829- includes = 'long-comments, long-comments.post.author'
835+ includes = 'long-comments,long-comments.post.author'
830836 actual_data = JSONAPI ::Serializer . serialize ( post , include : includes )
831837
832838 # Multiple expectations for better diff output for debugging.
@@ -1197,7 +1203,10 @@ def read_attribute_for_validation(attr)
11971203 long_comments . each { |c | c . post = post }
11981204
11991205 expected_data = {
1200- 'data' => serialize_primary ( post , { serializer : Api ::V1 ::MyApp ::PostSerializer } ) ,
1206+ 'data' => serialize_primary ( post , {
1207+ serializer : Api ::V1 ::MyApp ::PostSerializer ,
1208+ include_linkages : [ 'long-comments' ]
1209+ } ) ,
12011210 'included' => [
12021211 # Intermediates are included: long-comments, long-comments.post, and long-comments.post.author
12031212 # http://jsonapi.org/format/#document-structure-compound-documents
0 commit comments