Sha256: 623f394718bfaabd5c93057ffc83b2b84810d7bf61cdcd8c6cb4be81870c9c14

Contents?: true

Size: 915 Bytes

Versions: 9

Compression:

Stored size: 915 Bytes

Contents

require File.dirname(__FILE__) + '/../../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_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

9 entries across 9 versions & 4 rubygems

Version Path
martinstannard-activemerchant-0.1.0 test/unit/gateways/bogus_test.rb
seamusabshere-active_merchant-1.4.2.1 test/unit/gateways/bogus_test.rb
seamusabshere-active_merchant-1.4.2.3 test/unit/gateways/bogus_test.rb
activemerchant-1.3.0 test/unit/gateways/bogus_test.rb
activemerchant-1.4.1 test/unit/gateways/bogus_test.rb
activemerchant-1.3.1 test/unit/gateways/bogus_test.rb
activemerchant-1.3.2 test/unit/gateways/bogus_test.rb
activemerchant-1.4.0 test/unit/gateways/bogus_test.rb
spree-0.2.0 vendor/plugins/active_merchant/test/unit/gateways/bogus_test.rb