Skip to content

Commit

Permalink
Merge pull request #2227 from ccarruitero/cleanup
Browse files Browse the repository at this point in the history
remove unused update_params_payment_source method
  • Loading branch information
jhawthorn authored Sep 29, 2017
2 parents 9cfc15f + 5389c70 commit aab557d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/app/models/spree/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@ def update_params_payment_source
@updating_params[:order][:payments_attributes].first[:amount] = total
end
end
deprecate update_params_payment_source: :set_payment_parameters_amount, deprecator: Spree::Deprecation

def associate_store
self.store ||= Spree::Store.default
Expand Down
10 changes: 10 additions & 0 deletions core/spec/models/spree/order_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1538,4 +1538,14 @@ def generate
end
end
end

context 'update_params_payment_source' do
subject { described_class.new }

it 'is deprecated' do
subject.instance_variable_set('@updating_params', {})
expect(Spree::Deprecation).to receive(:warn)
subject.update_params_payment_source
end
end
end

0 comments on commit aab557d

Please sign in to comment.