@@ -10,9 +10,9 @@ def setup
10
10
@author2 = Author . new ( id : 2 , name : 'Tenderlove' )
11
11
@bio1 = Bio . new ( id : 1 , content : 'AMS Contributor' )
12
12
@bio2 = Bio . new ( id : 2 , content : 'Rails Contributor' )
13
- @first_post = Post . new ( id : 1 , title : 'Hello!!' , body : 'Hello, world!!' )
14
- @second_post = Post . new ( id : 2 , title : 'New Post' , body : 'Body' )
15
- @third_post = Post . new ( id : 3 , title : 'Yet Another Post' , body : 'Body' )
13
+ @first_post = Post . new ( id : 10 , title : 'Hello!!' , body : 'Hello, world!!' )
14
+ @second_post = Post . new ( id : 20 , title : 'New Post' , body : 'Body' )
15
+ @third_post = Post . new ( id : 30 , title : 'Yet Another Post' , body : 'Body' )
16
16
@blog = Blog . new ( { name : 'AMS Blog' } )
17
17
@first_post . blog = @blog
18
18
@second_post . blog = @blog
@@ -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' ] , blog : "999" , author : "1" } } ,
48
- { title : "New Post" , body : "Body" , id : "2 " , links : { comments : [ ] , blog : "999" , author : "2" } }
47
+ { title : "Hello!!" , body : "Hello, world!!" , id : "10 " , links : { comments : [ '1' , '2' ] , blog : "999" , author : "1" } } ,
48
+ { title : "New Post" , body : "Body" , id : "20 " , links : { comments : [ ] , blog : "999" , author : "2" } }
49
49
] , @adapter . serializable_hash [ :posts ] )
50
50
51
51
@@ -54,30 +54,30 @@ def test_include_multiple_posts_and_linked
54
54
id : "1" ,
55
55
body : "ZOMG A COMMENT" ,
56
56
links : {
57
- post : "1 " ,
57
+ post : "10 " ,
58
58
author : nil
59
59
}
60
60
} , {
61
61
id : "2" ,
62
62
body : "ZOMG ANOTHER COMMENT" ,
63
63
links : {
64
- post : "1 " ,
64
+ post : "10 " ,
65
65
author : nil
66
66
}
67
67
} ] ,
68
68
authors : [ {
69
69
id : "1" ,
70
70
name : "Steve K." ,
71
71
links : {
72
- posts : [ "1 " , "3 " ] ,
72
+ posts : [ "10 " , "30 " ] ,
73
73
roles : [ ] ,
74
74
bio : "1"
75
75
}
76
76
} , {
77
77
id : "2" ,
78
78
name : "Tenderlove" ,
79
79
links : {
80
- posts : [ "2 " ] ,
80
+ posts : [ "20 " ] ,
81
81
roles : [ ] ,
82
82
bio : "2"
83
83
}
@@ -117,15 +117,15 @@ def test_include_bio_and_linked
117
117
id : "1" ,
118
118
name : "Steve K." ,
119
119
links : {
120
- posts : [ "1 " , "3 " ] ,
120
+ posts : [ "10 " , "30 " ] ,
121
121
roles : [ ] ,
122
122
bio : "1"
123
123
}
124
124
} ] ,
125
125
posts : [ {
126
126
title : "Hello!!" ,
127
127
body : "Hello, world!!" ,
128
- id : "1 " ,
128
+ id : "10 " ,
129
129
links : {
130
130
comments : [ "1" , "2" ] ,
131
131
blog : "999" ,
@@ -134,7 +134,7 @@ def test_include_bio_and_linked
134
134
} , {
135
135
title : "Yet Another Post" ,
136
136
body : "Body" ,
137
- id : "3 " ,
137
+ id : "30 " ,
138
138
links : {
139
139
comments : [ ] ,
140
140
blog : nil ,
0 commit comments