Sha256: 8e05bd8978a4465c419808537d6e608b2ddaafe01a079e6f9f403264dea6bc45
Contents?: true
Size: 928 Bytes
Versions: 1
Compression:
Stored size: 928 Bytes
Contents
require File.dirname(__FILE__) + '/../../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 => 'MerbMerchant 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
merb_merchant-1.4.1 | test/remote/gateways/remote_trans_first_test.rb |