Sha256: bd5cf16da1c1675b9f77630bd4220fd8235960a88be4f28bf0f974c72979fca9

Contents?: true

Size: 898 Bytes

Versions: 34

Compression:

Stored size: 898 Bytes

Contents

require 'test_helper'

class RemoteTransFirstTest < Test::Unit::TestCase

  def setup
    @gateway = TransFirstGateway.new(fixtures(:trans_first))

    @credit_card = credit_card('4111111111111111')
    @amount = 100
    @options = { 
      :order_id => generate_unique_id,
      :invoice => 'ActiveMerchant Sale',
      :billing_address => address
    }
  end
  
  def test_successful_purchase
    assert response = @gateway.purchase(@amount, @credit_card, @options)
    assert_equal 'test transaction', response.message
    assert response.test?
    assert_success response
    assert !response.authorization.blank?
  end

  def test_invalid_login
    gateway = TransFirstGateway.new(
      :login => '',
      :password => ''
    )
    assert response = gateway.purchase(@amount, @credit_card, @options)
    assert_equal 'invalid account', response.message
    assert_failure response
  end
end

Version data entries

34 entries across 34 versions & 11 rubygems

Version Path
johnideal-activemerchant-1.4.10 test/remote/gateways/remote_trans_first_test.rb
johnideal-activemerchant-1.4.11 test/remote/gateways/remote_trans_first_test.rb
johnideal-activemerchant-1.4.4 test/remote/gateways/remote_trans_first_test.rb
johnideal-activemerchant-1.4.5 test/remote/gateways/remote_trans_first_test.rb
johnideal-activemerchant-1.4.6 test/remote/gateways/remote_trans_first_test.rb
johnideal-activemerchant-1.4.7 test/remote/gateways/remote_trans_first_test.rb
johnideal-activemerchant-1.4.8 test/remote/gateways/remote_trans_first_test.rb
mattbauer-activemerchant-1.4.2 test/remote/gateways/remote_trans_first_test.rb
tomriley-active_merchant-1.4.2.3 test/remote/gateways/remote_trans_first_test.rb
tomriley-active_merchant-1.4.2.4 test/remote/gateways/remote_trans_first_test.rb
tomriley-active_merchant-1.4.2.5 test/remote/gateways/remote_trans_first_test.rb
tomriley-active_merchant-1.4.2.6 test/remote/gateways/remote_trans_first_test.rb
tomriley-active_merchant-1.4.2.7 test/remote/gateways/remote_trans_first_test.rb
tomriley-active_merchant-1.4.2.8 test/remote/gateways/remote_trans_first_test.rb
tomriley-tomriley-active_merchant-1.4.2.4 test/remote/gateways/remote_trans_first_test.rb
goldstar-activemerchant-1.4.2.7 test/remote/gateways/remote_trans_first_test.rb
goldstar-activemerchant-1.4.2.6 test/remote/gateways/remote_trans_first_test.rb
tomriley-active_merchant-1.4.2.11 test/remote/gateways/remote_trans_first_test.rb
tomriley-active_merchant-1.4.2.10 test/remote/gateways/remote_trans_first_test.rb
smulube-activemerchant-1.5.1.4 test/remote/gateways/remote_trans_first_test.rb