test/remote/gateways/remote_paypal_test.rb in activemerchant-1.3.1 vs test/remote/gateways/remote_paypal_test.rb in activemerchant-1.3.2

- old
+ new

@@ -5,15 +5,15 @@ Base.gateway_mode = :test @gateway = PaypalGateway.new(fixtures(:paypal_certificate)) @creditcard = CreditCard.new( - :type => "Visa", + :type => "visa", :number => "4381258770269608", # Use a generated CC from the paypal Sandbox :verification_value => "000", :month => 1, - :year => 2008, + :year => Time.now.year + 1, :first_name => 'Fred', :last_name => 'Brooks' ) @params = { @@ -61,11 +61,11 @@ def test_successful_authorization response = @gateway.authorize(@amount, @creditcard, @params) assert_success response assert response.params['transaction_id'] - assert_equal '3.00', response.params['amount'] + assert_equal '1.00', response.params['amount'] assert_equal 'USD', response.params['amount_currency_id'] end def test_failed_authorization @creditcard.number = '234234234234' @@ -98,11 +98,11 @@ auth = @gateway.authorize(@amount, @creditcard, @params) assert_success auth response = @gateway.capture(@amount, auth.authorization) assert_success response assert response.params['transaction_id'] - assert_equal '3.00', response.params['gross_amount'] + assert_equal '1.00', response.params['gross_amount'] assert_equal 'USD', response.params['gross_amount_currency_id'] end def test_successful_voiding auth = @gateway.authorize(@amount, @creditcard, @params) @@ -117,14 +117,14 @@ credit = @gateway.credit(@amount, purchase.authorization, :note => 'Sorry') assert_success credit assert credit.test? assert_equal 'USD', credit.params['net_refund_amount_currency_id'] - assert_equal '2.61', credit.params['net_refund_amount'] + assert_equal '0.67', credit.params['net_refund_amount'] assert_equal 'USD', credit.params['gross_refund_amount_currency_id'] - assert_equal '3.00', credit.params['gross_refund_amount'] + assert_equal '1.00', credit.params['gross_refund_amount'] assert_equal 'USD', credit.params['fee_refund_amount_currency_id'] - assert_equal '0.39', credit.params['fee_refund_amount'] + assert_equal '0.33', credit.params['fee_refund_amount'] end def test_failed_voiding response = @gateway.void('foo') assert_failure response