Sha256: 8fcb7b416280224f297982ea3412e777d65f2fbc0cf969271bea18c193e23d51

Contents?: true

Size: 834 Bytes

Versions: 34

Compression:

Stored size: 834 Bytes

Contents

require 'test_helper'

class PaypalModuleTest < Test::Unit::TestCase
  include ActiveMerchant::Billing::Integrations
  
  def test_notification_method
    assert_instance_of Paypal::Notification, Paypal.notification('name=cody')
  end

  def test_test_mode
    ActiveMerchant::Billing::Base.integration_mode = :test
    assert_equal 'https://www.sandbox.paypal.com/cgi-bin/webscr', Paypal.service_url
  end

  def test_production_mode
    ActiveMerchant::Billing::Base.integration_mode = :production
    assert_equal 'https://www.paypal.com/cgi-bin/webscr', Paypal.service_url
  end

  def test_invalid_mode
    ActiveMerchant::Billing::Base.integration_mode = :zoomin
    assert_raise(StandardError){ Paypal.service_url }
  end
  
  def test_return_method
    assert_instance_of Paypal::Return, Paypal.return('name=cody')
  end
end 

Version data entries

34 entries across 34 versions & 11 rubygems

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