Skip to content

Commit e323b89

Browse files
committed
Added api_v1 path in testing
1 parent 403f146 commit e323b89

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/controllers/comments_controller_test.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ class CommentsControllerTest < ActionDispatch::IntegrationTest
1919
end
2020

2121
test "should show comment" do
22-
get comment_url(@comment), as: :json
22+
get api_v1_comment_url(@comment), as: :json
2323
assert_response :success
2424
end
2525

2626
test "should update comment" do
27-
patch comment_url(@comment), params: { comment: { body: @comment.body, post_id: @comment.post_id, published: @comment.published, user_id: @comment.user_id } }, as: :json
27+
patch api_v1_comment_url(@comment), params: { comment: { body: @comment.body, post_id: @comment.post_id, published: @comment.published, user_id: @comment.user_id } }, as: :json
2828
assert_response 200
2929
end
3030

3131
test "should destroy comment" do
3232
assert_difference('Comment.count', -1) do
33-
delete comment_url(@comment), as: :json
33+
delete api_v1_comment_url(@comment), as: :json
3434
end
3535

3636
assert_response 204

0 commit comments

Comments
 (0)