Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions example_app/spec/requests/api/v1/links_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
it "creates the link" do
link_params = attributes_for(:link)

post "/api/v1/links", link: link_params
post "/api/v1/links", params: { link: link_params }

expect(response.status).to eq 201
expect(Link.last.title).to eq link_params[:title]
Expand All @@ -34,7 +34,7 @@
it "returns a 422, with errors" do
link_params = attributes_for(:link, :invalid)

post "/api/v1/links", link: link_params
post "/api/v1/links", params: { link: link_params }

expect(response.status).to eq 422
expect(json_body.fetch("errors")).not_to be_empty
Expand Down