Sha256: 5169b01eca8dd688861a57dce6e7184e32ef3d7d38b92980261086b9bdfe20c5

Contents?: true

Size: 1.18 KB

Versions: 3

Compression:

Stored size: 1.18 KB

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_recurring
    @gateway.recurring(1000, @creditcard)
  end

  def test_cancel_recurring
    @gateway.cancel_recurring(@response.params["transid"])
  end

  def test_recurring_inquiry
    @gateway.recurring_inquiry(@response.params["transid"])
  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

3 entries across 3 versions & 1 rubygems

Version Path
smulube-activemerchant-1.5.1.4 test/unit/gateways/bogus_test.rb
smulube-activemerchant-1.5.1.3 test/unit/gateways/bogus_test.rb
smulube-activemerchant-1.5.1.2 test/unit/gateways/bogus_test.rb