Sha256: 7e7f084a2243419170716e31eb45ee8949822b4b8426e1e8512f46117b1fea77

Contents?: true

Size: 953 Bytes

Versions: 23

Compression:

Stored size: 953 Bytes

Contents

require 'test_helper'

class BogusTest < Test::Unit::TestCase
  def setup
    @gateway = BogusGateway.new(
      :login => 'bogus',
      :password => 'bogus'
    )
    
    @creditcard = credit_card('1')
    
    @response = ActiveMerchant::Billing::Response.new(true, "Transaction successful", :transid => BogusGateway::AUTHORIZATION)
  end

  def test_authorize
    @gateway.capture(1000, @creditcard)    
  end

  def test_purchase
    @gateway.purchase(1000, @creditcard)    
  end

  def test_credit
    @gateway.credit(1000, @response.params["transid"])
  end

  def test_void
    @gateway.void(@response.params["transid"])
  end
  
  def  test_store
    @gateway.store(@creditcard)
  end
  
  def test_unstore
    @gateway.unstore('1')
  end
  
  def test_supported_countries
    assert_equal ['US'], BogusGateway.supported_countries
  end
  
  def test_supported_card_types
    assert_equal [:bogus], BogusGateway.supported_cardtypes
  end
end

Version data entries

23 entries across 23 versions & 9 rubygems

Version Path
johnideal-activemerchant-1.4.10 test/unit/gateways/bogus_test.rb
johnideal-activemerchant-1.4.11 test/unit/gateways/bogus_test.rb
johnideal-activemerchant-1.4.4 test/unit/gateways/bogus_test.rb
johnideal-activemerchant-1.4.5 test/unit/gateways/bogus_test.rb
johnideal-activemerchant-1.4.6 test/unit/gateways/bogus_test.rb
johnideal-activemerchant-1.4.7 test/unit/gateways/bogus_test.rb
johnideal-activemerchant-1.4.8 test/unit/gateways/bogus_test.rb
mattbauer-activemerchant-1.4.2 test/unit/gateways/bogus_test.rb
tomriley-active_merchant-1.4.2.3 test/unit/gateways/bogus_test.rb
goldstar-activemerchant-1.4.2.7 test/unit/gateways/bogus_test.rb
goldstar-activemerchant-1.4.2.6 test/unit/gateways/bogus_test.rb
ghazel-activemerchant-1.4.2 test/unit/gateways/bogus_test.rb
activemerchant-est-1.4.2.6 test/unit/gateways/bogus_test.rb
activemerchant-1.5.0 test/unit/gateways/bogus_test.rb
patmaddox-activemerchant-1.4.2.6 test/unit/gateways/bogus_test.rb
patmaddox-activemerchant-1.4.2.5 test/unit/gateways/bogus_test.rb
patmaddox-activemerchant-1.4.2.4 test/unit/gateways/bogus_test.rb
patmaddox-activemerchant-1.4.2.3 test/unit/gateways/bogus_test.rb
patmaddox-activemerchant-1.4.2.2 test/unit/gateways/bogus_test.rb
patmaddox-activemerchant-1.4.2.1 test/unit/gateways/bogus_test.rb