Skip to content

Commit

Permalink
Remove some unused ReturnAuthorizationController code
Browse files Browse the repository at this point in the history
"receive" no longer applies to ReturnAuthorization. "Receiving" has been moved to CustomerReturn.

fixes #5584
  • Loading branch information
jordan-brough authored and Jeff Dutil committed Nov 7, 2014
1 parent bbc876d commit 8ae1e15
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ def update
end
end

def receive
@return_authorization = order.return_authorizations.accessible_by(current_ability, :update).find(params[:id])
if @return_authorization.receive
respond_with @return_authorization, default_template: :show
else
invalid_resource!(@return_authorization)
end
end

def cancel
@return_authorization = order.return_authorizations.accessible_by(current_ability, :update).find(params[:id])
if @return_authorization.cancel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,6 @@ module Spree
expect(json_response).to have_attributes(attributes)
end

it "cannot mark a return authorization as received on the order with no inventory units" do
FactoryGirl.create(:new_return_authorization, :order => order)
return_authorization = order.return_authorizations.first
expect(return_authorization.state).to eq("authorized")
api_delete :receive, :id => return_authorization.id
expect(response.status).to eq(422)
expect(return_authorization.reload.state).to eq("authorized")
end

it "can cancel a return authorization on the order" do
FactoryGirl.create(:new_return_authorization, :order => order)
return_authorization = order.return_authorizations.first
Expand Down

0 comments on commit 8ae1e15

Please sign in to comment.