Sha256: f49b5d3f6dfd1dde94f7e29f3a65f9a2d892fa04d91cd384594194a0a7c67fad

Contents?: true

Size: 759 Bytes

Versions: 35

Compression:

Stored size: 759 Bytes

Contents

require 'spec_helper'

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

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

  context '.auto_capture?' do
    it 'supports purchase method only' do
      expect(gateway.auto_capture?).to be true
    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
spree_gateway-3.9.3 spec/models/gateway/eway_spec.rb
spree_gateway-3.9.2 spec/models/gateway/eway_spec.rb
spree_gateway-3.9.0 spec/models/gateway/eway_spec.rb
spree_gateway-3.8.0 spec/models/gateway/eway_spec.rb
spree_gateway-3.7.5 spec/models/gateway/eway_spec.rb
spree_gateway-3.7.4 spec/models/gateway/eway_spec.rb
spree_gateway-3.7.3 spec/models/gateway/eway_spec.rb
spree_gateway-3.7.2 spec/models/gateway/eway_spec.rb
spree_gateway-3.7.1 spec/models/gateway/eway_spec.rb
spree_gateway-3.7.0 spec/models/gateway/eway_spec.rb
spree_gateway-3.6.7 spec/models/gateway/eway_spec.rb
spree_gateway-3.3.7 spec/models/gateway/eway_spec.rb
spree_gateway-3.6.5 spec/models/gateway/eway_spec.rb
spree_gateway-3.6.4 spec/models/gateway/eway_spec.rb
spree_gateway-3.3.5 spec/models/gateway/eway_spec.rb
spree_gateway-3.6.1 spec/models/gateway/eway_spec.rb
spree_gateway-3.6.0 spec/models/gateway/eway_spec.rb
spree_gateway-3.4.1 spec/models/gateway/eway_spec.rb
spree_gateway-3.4.0 spec/models/gateway/eway_spec.rb
spree_gateway-3.3.3 spec/models/gateway/eway_spec.rb