Sha256: 13eba25babbc98bb5521b82d454afbecd1e739e018ba689e5fde2c32550bc446

Contents?: true

Size: 655 Bytes

Versions: 7

Compression:

Stored size: 655 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 :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

7 entries across 7 versions & 1 rubygems

Version Path
solidus_gateway-1.3.0 spec/models/gateway/authorize_net_spec.rb
solidus_gateway-1.2.0 spec/models/gateway/authorize_net_spec.rb
solidus_gateway-1.1.1 spec/models/gateway/authorize_net_spec.rb
solidus_gateway-1.1.0 spec/models/gateway/authorize_net_spec.rb
solidus_gateway-1.0.1 spec/models/gateway/authorize_net_spec.rb
solidus_gateway-0.9.0 spec/models/gateway/authorize_net_spec.rb
solidus_gateway-1.0.0 spec/models/gateway/authorize_net_spec.rb