mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
update spec
This commit is contained in:
@@ -16,6 +16,7 @@ describe Spree::Gateway::StripeSCA, type: :model do
|
||||
amount: order.total,
|
||||
payment_method: subject,
|
||||
source: credit_card,
|
||||
response_code: "12345"
|
||||
)
|
||||
}
|
||||
let(:gateway_options) {
|
||||
|
||||
@@ -103,9 +103,8 @@ describe Spree::Payment do
|
||||
allow(payment).to receive(:response_code) { "pi_123" }
|
||||
end
|
||||
|
||||
it "should call capture instead of purchase" do
|
||||
expect(payment).to receive(:capture!)
|
||||
expect(payment).to_not receive(:purchase!)
|
||||
it "should call purchase" do
|
||||
expect(payment).to receive(:purchase!)
|
||||
payment.process!
|
||||
end
|
||||
end
|
||||
@@ -119,7 +118,7 @@ describe Spree::Payment do
|
||||
it "should call capture if the payment is already authorized" do
|
||||
expect(payment).to receive(:capture!)
|
||||
expect(payment).to_not receive(:purchase!)
|
||||
payment.process!
|
||||
payment.process_offline!
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user