@@ -44,8 +44,8 @@ def test_include_multiple_posts_and_linked
44
44
@second_comment . post = @first_post
45
45
@second_comment . author = nil
46
46
assert_equal ( [
47
- { title : "Hello!!" , body : "Hello, world!!" , id : "1" , links : { comments : [ '1' , '2' ] , author : "1" } } ,
48
- { title : "New Post" , body : "Body" , id : "2" , links : { comments : [ ] , :author => "2" } }
47
+ { title : "Hello!!" , body : "Hello, world!!" , id : "1" , links : { comments : [ '1' , '2' ] , blog : "999" , author : "1" } } ,
48
+ { title : "New Post" , body : "Body" , id : "2" , links : { comments : [ ] , blog : "999" , author : "2" } }
49
49
] , @adapter . serializable_hash [ :posts ] )
50
50
51
51
@@ -69,7 +69,7 @@ def test_include_multiple_posts_and_linked
69
69
id : "1" ,
70
70
name : "Steve K." ,
71
71
links : {
72
- posts : [ "1" ] ,
72
+ posts : [ "1" , "3" ] ,
73
73
roles : [ ] ,
74
74
bio : "1"
75
75
}
@@ -99,7 +99,7 @@ def test_include_multiple_posts_and_linked
99
99
assert_equal expected , @adapter . serializable_hash [ :linked ]
100
100
end
101
101
102
- def test_include_multiple_posts_and_linked
102
+ def test_include_bio_and_linked
103
103
@serializer = BioSerializer . new ( @bio1 )
104
104
@adapter = ActiveModel ::Serializer ::Adapter ::JsonApi . new ( @serializer , include : 'author,author.posts' )
105
105
0 commit comments