From 484576d1ace215e1d8db1664feb53205234e7fbc Mon Sep 17 00:00:00 2001 From: Andy Brett Date: Tue, 15 Dec 2020 10:30:05 -0800 Subject: [PATCH] add unit test for stripe connect --- spec/models/spree/gateway/stripe_connect_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/models/spree/gateway/stripe_connect_spec.rb b/spec/models/spree/gateway/stripe_connect_spec.rb index cc4cb8f6b9..c6621b9343 100644 --- a/spec/models/spree/gateway/stripe_connect_spec.rb +++ b/spec/models/spree/gateway/stripe_connect_spec.rb @@ -91,4 +91,15 @@ describe Spree::Gateway::StripeConnect, type: :model do expect(provider).to have_received(:refund).with(money, response_code, hash_including(stripe_account: stripe_account_id)) end end + + describe "#charging offline" do + let(:gateway_options) { { some: 'option' } } + let(:money) { double(:money) } + let(:card) { double(:creditcard) } + + it "uses #purchase to charge offline" do + subject.charge_offline(money, card, gateway_options) + expect(provider).to have_received(:purchase).with('money', 'cc', 'opts') + end + end end