Ensure StatusesController#update uses PATCH

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/3597/head
Alex Coles 9 years ago
parent cefd961397
commit ba3e56e4ce
  1. 2
      app/controllers/statuses_controller.rb
  2. 6
      spec/controllers/statuses_controller_spec.rb

@ -63,7 +63,7 @@ class StatusesController < ApplicationController
@status = Status.find(params[:id])
end
verify method: :put, only: :update, render: { nothing: true, status: :method_not_allowed }
verify method: :patch, only: :update, render: { nothing: true, status: :method_not_allowed }
def update
@status = Status.find(params[:id])
if @status.update_attributes(permitted_params.status)

@ -131,9 +131,9 @@ describe StatusesController, type: :controller do
before do
status
put :update,
id: status.id,
status: { name: name }
patch :update,
id: status.id,
status: { name: name }
end
it_behaves_like :statuses

Loading…
Cancel
Save