Skip to content

Commit fc5b8dc

Browse files
committed
Fix deprecated methods
1 parent bd5d3fd commit fc5b8dc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spec/controllers/comments_controller_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
Post.find(@post_id).comments.create!(@new_comment)
2121
get :index, params: { post_id: @post_id }
2222

23-
expect(response).to be_success
23+
expect(response).to be_successful
2424
expect(JSON.parse(response.body).size).to be 2
2525
end
2626
end
@@ -31,7 +31,7 @@
3131
get :show, params: { post_id: @post_id, id: @comment_id }
3232
body = JSON.parse(response.body)
3333

34-
expect(response).to be_success
34+
expect(response).to be_successful
3535
expect(body["name"]).to eq @comment["name"]
3636
expect(body["message"]).to eq @comment["message"]
3737
end

spec/controllers/posts_controller_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
Post.create!(@new_post)
1515
get :index
1616

17-
expect(response).to be_success
17+
expect(response).to be_successful
1818
expect(JSON.parse(response.body).size).to be 2
1919
end
2020
end
@@ -25,7 +25,7 @@
2525
get :show, params: { id: @post_id }
2626
body = JSON.parse(response.body)
2727

28-
expect(response).to be_success
28+
expect(response).to be_successful
2929
expect(body["title"]).to eq @post["title"]
3030
expect(body["content"]).to eq @post["content"]
3131
end

0 commit comments

Comments
 (0)