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.3.2 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.3.0 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.3.0.rc2 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.3.0.rc1 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.2.0 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.2.0.beta spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.1.0 spec/models/gateway/authorize_net_spec.rb
spree_gateway-3.0.0 spec/models/gateway/authorize_net_spec.rb