Skip to content

Commit

Permalink
Fix invalid Payment in Spree::Payment spec
Browse files Browse the repository at this point in the history
While this spec will  pass, any additional attempts to save the payment
in question would fail as the Payment was not able to save on create
due to it being invalid (missing a source).
  • Loading branch information
James Gayfer committed Jun 7, 2018
1 parent f41063d commit f9f398d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions core/spec/models/spree/payment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -668,12 +668,9 @@
end

context 'when the payment was completed but now void' do
let(:payment) do
Spree::Payment.create(
amount: 100,
order: order,
state: 'completed'
)
before do
payment.state = 'completed'
payment.amount = 100
end

it 'updates order payment total' do
Expand Down

0 comments on commit f9f398d

Please sign in to comment.