@@ -423,7 +423,7 @@ def serialize_primary(object, options = {})
423423 expect ( JSONAPI ::Serializer . serialize ( post , include : [ 'author' ] ) ) . to eq ( {
424424 'data' => expected_primary_data ,
425425 'included' => [
426- serialize_primary ( post . author , { serializer : MyApp ::UserSerializer } ) ,
426+ serialize_primary ( post . author , { serializer : MyAppOtherNamespace ::UserSerializer } ) ,
427427 ] ,
428428 } )
429429 end
@@ -518,7 +518,7 @@ def serialize_primary(object, options = {})
518518 'data' => serialize_primary ( post , { serializer : MyApp ::PostSerializer } ) ,
519519 'included' => [
520520 # Only the author is included:
521- serialize_primary ( post . author , { serializer : MyApp ::UserSerializer } ) ,
521+ serialize_primary ( post . author , { serializer : MyAppOtherNamespace ::UserSerializer } ) ,
522522 ] ,
523523 }
524524 includes = [ 'long-comments.post.author' ]
@@ -542,8 +542,8 @@ def serialize_primary(object, options = {})
542542 # Same note about primary data linkages as above.
543543 'data' => serialize_primary ( post , { serializer : MyApp ::PostSerializer } ) ,
544544 'included' => [
545- serialize_primary ( first_user , { serializer : MyApp ::UserSerializer } ) ,
546- serialize_primary ( second_user , { serializer : MyApp ::UserSerializer } ) ,
545+ serialize_primary ( first_user , { serializer : MyAppOtherNamespace ::UserSerializer } ) ,
546+ serialize_primary ( second_user , { serializer : MyAppOtherNamespace ::UserSerializer } ) ,
547547 ] ,
548548 }
549549 includes = [ 'long-comments.user' ]
@@ -571,7 +571,7 @@ def serialize_primary(object, options = {})
571571 include_linkages : [ 'user' ] ,
572572 } ) ,
573573 # Note: post.author does not show up here because it was not included.
574- serialize_primary ( comment_user , { serializer : MyApp ::UserSerializer } ) ,
574+ serialize_primary ( comment_user , { serializer : MyAppOtherNamespace ::UserSerializer } ) ,
575575 ] ,
576576 }
577577 includes = [ 'long-comments' , 'long-comments.user' ]
@@ -598,7 +598,7 @@ def serialize_primary(object, options = {})
598598 'included' => [
599599 serialize_primary ( long_comments . first , { serializer : MyApp ::LongCommentSerializer } ) ,
600600 serialize_primary ( long_comments . last , { serializer : MyApp ::LongCommentSerializer } ) ,
601- serialize_primary ( post . author , { serializer : MyApp ::UserSerializer } ) ,
601+ serialize_primary ( post . author , { serializer : MyAppOtherNamespace ::UserSerializer } ) ,
602602 ] ,
603603 }
604604 # Also test that it handles string include arguments.
0 commit comments