Sha256: 5ba7751a21f085f1bc239d75315f0917d5b8bc3069573f389c1f56b655a0f3b3
Contents?: true
Size: 1.06 KB
Versions: 6
Compression:
Stored size: 1.06 KB
Contents
RSpec.shared_examples "it uses the payment page gateway" do it_behaves_like "it has route access" describe '#gateway' do it 'configures the gateway urls correctly' do expect(::SolidusSixSaferpay::PaymentPageGateway).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 PaymentPageGateway' do expect(subject.gateway).to be_a(::SolidusSixSaferpay::PaymentPageGateway) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems