Sha256: 5473a72b40f870852eb030efaa832853aa2ad9534ca30e30d3937f5492ac4234

Contents?: true

Size: 724 Bytes

Versions: 11

Compression:

Stored size: 724 Bytes

Contents

require File.dirname(__FILE__) + '/../../test_helper'

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

    @credit_card = credit_card('4111111111111111',
      :month => '7',
      :year  => '2007'
    )
    
    @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

11 entries across 11 versions & 5 rubygems

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