File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 20
20
Post . find ( @post_id ) . comments . create! ( @new_comment )
21
21
get :index , params : { post_id : @post_id }
22
22
23
- expect ( response ) . to be_success
23
+ expect ( response ) . to be_successful
24
24
expect ( JSON . parse ( response . body ) . size ) . to be 2
25
25
end
26
26
end
31
31
get :show , params : { post_id : @post_id , id : @comment_id }
32
32
body = JSON . parse ( response . body )
33
33
34
- expect ( response ) . to be_success
34
+ expect ( response ) . to be_successful
35
35
expect ( body [ "name" ] ) . to eq @comment [ "name" ]
36
36
expect ( body [ "message" ] ) . to eq @comment [ "message" ]
37
37
end
Original file line number Diff line number Diff line change 14
14
Post . create! ( @new_post )
15
15
get :index
16
16
17
- expect ( response ) . to be_success
17
+ expect ( response ) . to be_successful
18
18
expect ( JSON . parse ( response . body ) . size ) . to be 2
19
19
end
20
20
end
25
25
get :show , params : { id : @post_id }
26
26
body = JSON . parse ( response . body )
27
27
28
- expect ( response ) . to be_success
28
+ expect ( response ) . to be_successful
29
29
expect ( body [ "title" ] ) . to eq @post [ "title" ]
30
30
expect ( body [ "content" ] ) . to eq @post [ "content" ]
31
31
end
You can’t perform that action at this time.
0 commit comments