Sha256: d0b4ce397fc02c72512c90d1d8b92f53d3d820f7674c223ce8a1aaee06408e1a

Contents?: true

Size: 1.2 KB

Versions: 34

Compression:

Stored size: 1.2 KB

Contents

require 'test_helper'

class TwoCheckoutReturnTest < Test::Unit::TestCase
  include ActiveMerchant::Billing::Integrations

  def test_successful_purchase
    r = TwoCheckout::Return.new(successful_purchase)
    assert r.success?
  end
  
  def test_pending_purchase
    r = TwoCheckout::Return.new(failed_purchase)
    assert !r.success?
  end
  
  private
  def successful_purchase
    'sid=1232919&fixed=Y&key=C17C887BDCCD0499264FAE9F578CCA66&state=ON&email=codyfauser%40gmail.com&street_address=138+Clarence+St.&city=Ottawa&cart_order_id=9&order_number=3860340141&merchant_order_id=%231009&country=CAN&ip_country=&cart_id=9&lang=en&demo=Y&pay_method=CC&total=118.30&phone=%28613%29555-5555+&credit_card_processed=Y&zip=K1N5P8&street_address2=Apartment+1&card_holder_name=Cody++Fauser'
  end
  
  def failed_purchase
    'sid=1232919&fixed=Y&key=C17C887BDCCD0499264FAE9F578CCA66&state=ON&email=codyfauser%40gmail.com&street_address=138+Clarence+St.&city=Ottawa&cart_order_id=9&order_number=3860340141&merchant_order_id=%231009&country=CAN&ip_country=&cart_id=9&lang=en&demo=Y&pay_method=CC&total=118.30&phone=%28613%29555-5555+&credit_card_processed=K&zip=K1N5P8&street_address2=Apartment+1&card_holder_name=Cody++Fauser'
  end
end

Version data entries

34 entries across 34 versions & 11 rubygems

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