Sha256: ad50b8b91bd2ad905c1543a7fceaa6b1345c7e8b408f652a3028a86b5656046a
Contents?: true
Size: 1.06 KB
Versions: 6
Compression:
Stored size: 1.06 KB
Contents
RSpec.shared_examples "it uses the transaction gateway" do it_behaves_like "it has route access" describe '#gateway' do it 'configures the gateway urls correctly' do expect(::SolidusSixSaferpay::TransactionGateway).to receive(:new) subject.gateway end context 'when the gateway is configured correctly' do before do allow(ENV).to receive(:fetch).with("SIX_SAFERPAY_CUSTOMER_ID").and_return("customer_id") allow(ENV).to receive(:fetch).with("SIX_SAFERPAY_TERMINAL_ID").and_return("terminal_id") allow(ENV).to receive(:fetch).with("SIX_SAFERPAY_USERNAME").and_return("username") allow(ENV).to receive(:fetch).with("SIX_SAFERPAY_PASSWORD").and_return("password") allow(ENV).to receive(:fetch).with("SIX_SAFERPAY_BASE_URL").and_return("base_url") allow(ENV).to receive(:fetch).with("SIX_SAFERPAY_CSS_URL").and_return("css_url") end it 'should return a TransactionGateway' do expect(subject.gateway).to be_a(::SolidusSixSaferpay::TransactionGateway) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems