Sha256: 52e03109816b4ceea98f992d58a4073c8536614b8efcc33d21a2a0e81c03fb9a

Contents?: true

Size: 687 Bytes

Versions: 5

Compression:

Stored size: 687 Bytes

Contents

require 'spec_helper'

describe Spree::Gateway::PayJunction do
  let(:gateway) { described_class.create!(name: 'PayJunction', stores: [::Spree::Store.default]) }

  context '.provider_class' do
    it 'is a PayJunction gateway' do
      expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::PayJunctionGateway
    end
  end

  describe 'options' do
    it 'include :test => true in  when :test_mode is true' do
      gateway.preferred_test_mode = true
      expect(gateway.options[:test]).to be true
    end

    it 'does not include :test when test_mode is false' do
      gateway.preferred_test_mode = false
      expect(gateway.options[:test]).to be false
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
spree_gateway-3.11.0 spec/models/gateway/pay_junction_spec.rb
spree_gateway-3.10.0 spec/models/gateway/pay_junction_spec.rb
archetype_spree_gateway-3.9.5.1 spec/models/gateway/pay_junction_spec.rb
archetype_spree_gateway-3.9.5 spec/models/gateway/pay_junction_spec.rb
spree_gateway-3.9.4 spec/models/gateway/pay_junction_spec.rb