Sha256: 2eab17c42c895f35a2bc1ddf21931c2a81b2c32e82df94de4f5b49b48821eff1

Contents?: true

Size: 653 Bytes

Versions: 35

Compression:

Stored size: 653 Bytes

Contents

require 'spec_helper'

describe Spree::Gateway::PayJunction do
  let(:gateway) { described_class.create!(name: 'PayJunction') }

  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

35 entries across 35 versions & 2 rubygems

Version Path
solidus_gateway-1.3.0 spec/models/gateway/pay_junction_spec.rb
spree_gateway-3.3.2 spec/models/gateway/pay_junction_spec.rb
solidus_gateway-1.2.0 spec/models/gateway/pay_junction_spec.rb
spree_gateway-3.3.0 spec/models/gateway/pay_junction_spec.rb
spree_gateway-3.3.0.rc2 spec/models/gateway/pay_junction_spec.rb
spree_gateway-3.3.0.rc1 spec/models/gateway/pay_junction_spec.rb
spree_gateway-3.2.0 spec/models/gateway/pay_junction_spec.rb
spree_gateway-3.2.0.beta spec/models/gateway/pay_junction_spec.rb
solidus_gateway-1.1.1 spec/models/gateway/pay_junction_spec.rb
solidus_gateway-1.1.0 spec/models/gateway/pay_junction_spec.rb
spree_gateway-3.1.0 spec/models/gateway/pay_junction_spec.rb
spree_gateway-3.0.0 spec/models/gateway/pay_junction_spec.rb
solidus_gateway-1.0.1 spec/models/gateway/pay_junction_spec.rb
solidus_gateway-0.9.0 spec/models/gateway/pay_junction_spec.rb
solidus_gateway-1.0.0 spec/models/gateway/pay_junction_spec.rb