Skip to content

Commit

Permalink
Worldpay: Comment out remote refund tests since it takes some time fo…
Browse files Browse the repository at this point in the history
…r the transaction to move states

This can be tested by capturing a transaction, recording the auth code
and then attempting the refund awhile later.
  • Loading branch information
John Duff committed Aug 8, 2012
1 parent 02f547b commit d3ef666
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions test/remote/gateways/remote_worldpay_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,22 @@ def test_void
assert_failure @gateway.void('bogus')
end

def test_refund
assert_success(auth = @gateway.authorize(@amount, @credit_card, @options))
assert_success @gateway.refund(@amount, auth.authorization)

assert_failure @gateway.refund(@amount, 'bogus')
end
# Worldpay has a delay between asking for a transaction to be captured and actually marking it as captured
# These tests work if you take the auth code, wait some time and then request the refund
#def test_refund
# assert_success(auth = @gateway.authorize(@amount, @credit_card, @options))
# assert_success auth
# assert_equal 'SUCCESS', auth.message
# assert auth.authorization
# puts auth.authorization
# assert capture = @gateway.capture(@amount, auth.authorization)
# assert_success @gateway.refund(@amount, auth.authorization)
#end
#
#def test_refund_existing_transaction
# assert_success resp = @gateway.refund(@amount, "7c85e685c35115689ff9c429be9f65e7")
# puts resp.inspect
#end

def test_currency
assert_success(result = @gateway.authorize(@amount, @credit_card, @options.merge(:currency => 'USD')))
Expand Down

0 comments on commit d3ef666

Please sign in to comment.