Sha256: b0cc754ea3f22bcae2f70f37e7c8946a0961f565cc93fc72afbca54e0d915569

Contents?: true

Size: 648 Bytes

Versions: 28

Compression:

Stored size: 648 Bytes

Contents

require 'spec_helper'

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

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

  describe 'options' do
    it 'include :test => true when server is "test"' do
      gateway.preferred_server = "test"
      expect(gateway.options[:test]).to be true
    end

    it 'does not include :test when server is "live"' do
      gateway.preferred_server = "live"
      expect(gateway.options[:test]).to be false
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
spree_gateway-3.9.3 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.9.2 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.9.0 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.8.0 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.7.5 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.7.4 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.7.3 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.7.2 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.7.1 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.7.0 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.6.7 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.3.7 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.6.5 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.6.4 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.3.5 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.6.1 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.6.0 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.4.1 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.4.0 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.3.3 spec/models/gateway/authorize_net_spec.rb