Sha256: bf342c3be22df4ac4a62e50a646475de95173f62e2bc1834027030306e868d1e

Contents?: true

Size: 692 Bytes

Versions: 4

Compression:

Stored size: 692 Bytes

Contents

require 'test_helper'

class RemoteSecurePayTest < Test::Unit::TestCase  
  
  def setup
    @gateway = SecurePayGateway.new(fixtures(:secure_pay))

    @credit_card = credit_card('4111111111111111',
      :month => '7',
      :year  => '2014'
    )
    
    @options = { :order_id => generate_unique_id,
      :description => 'Store purchase',
      :billing_address => address
    }
    
    @amount = 100
  end
  
  def test_successful_purchase
    assert response = @gateway.purchase(@amount, @credit_card, @options)
    assert response.success?
    assert response.test?
    assert_equal 'This transaction has been approved', response.message
    assert response.authorization
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
smulube-activemerchant-1.5.1.4 test/remote/gateways/remote_secure_pay_test.rb
smulube-activemerchant-1.5.1.3 test/remote/gateways/remote_secure_pay_test.rb
smulube-activemerchant-1.5.1.2 test/remote/gateways/remote_secure_pay_test.rb
activemerchant-1.5.0 test/remote/gateways/remote_secure_pay_test.rb