Skip to content

Commit

Permalink
only return supplier id on destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
angusmcleod committed Sep 17, 2024
1 parent e5bf5f8 commit c5b8b08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def authorize_callback

def destroy
if @supplier.destroy_authorization
render json: success_json.merge(supplier: @supplier.reload)
render json: success_json.merge(supplier_id: @supplier.id)
else
render json: failed_json
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@

delete "/admin/plugins/subscription-client/suppliers/authorize", params: { supplier_id: supplier.id }
expect(response.status).to eq(200)
expect(response.parsed_body["supplier_id"]).to eq(supplier.id)
expect(supplier.authorized?).to eq(false)
end
end
Expand Down

0 comments on commit c5b8b08

Please sign in to comment.