Sha256: 3dda59beee7ea44e5c3c1cf4662da5bb72598629787815b5bc64acf1fc2d77e6

Contents?: true

Size: 682 Bytes

Versions: 5

Compression:

Stored size: 682 Bytes

Contents

require 'spec_helper'

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

  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

5 entries across 5 versions & 2 rubygems

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