Skip to content

Commit

Permalink
Move source into a let
Browse files Browse the repository at this point in the history
  • Loading branch information
SebAshton committed Sep 13, 2016
1 parent 81a926d commit 867cd46
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions spec/controllers/spree/api/adyen_redirect_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,9 @@
merchant_reference: order.number)
end

# there will already be a payment and source created at this point
before do
source =
create(:hpp_source, psp_reference: psp_reference, order: order)
let(:source) { create(:hpp_source, psp_reference: psp_reference, order: order) }

before do
create(:hpp_payment, source: source, order: order)

order.contents.advance
Expand Down

0 comments on commit 867cd46

Please sign in to comment.