Skip to content

Commit 403f146

Browse files
committed
Added api/v1/ path in spec
1 parent 0a61387 commit 403f146

5 files changed

+2
-2
lines changed

spec/controllers/comments_controller_spec.rb renamed to spec/controllers/api/v1/comments_controller_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
post :create, params: {comment: valid_attributes}, session: valid_session
8787
expect(response).to have_http_status(:created)
8888
expect(response.content_type).to include('application/json')
89-
expect(response.location).to eq(comment_url(Comment.last))
89+
expect(response.location).to eq(api_v1_comment_url(Comment.last))
9090
end
9191
end
9292

spec/controllers/users_controller_spec.rb renamed to spec/controllers/api/v1/users_controller_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
post :create, params: {user: valid_attributes}, session: valid_session
7777
expect(response).to have_http_status(:created)
7878
expect(response.content_type).to include('application/json')
79-
expect(response.location).to eq(user_url(User.last.username))
79+
expect(response.location).to eq(api_v1_user_url(User.last.username))
8080
end
8181
end
8282

0 commit comments

Comments
 (0)