Skip to content

Commit

Permalink
Fix the failing CyberSource remote test. The CyberSource gateway resp…
Browse files Browse the repository at this point in the history
…onds with a 500 for invalid logins so ActiveMerchant::Connection raises a ResponseError instead of returning the response itself [Patrick Joyce]
  • Loading branch information
Soleone committed May 14, 2010
1 parent 2fa48b1 commit 0815ffd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
@@ -1,5 +1,6 @@
= ActiveMerchant CHANGELOG

* Fix failing CyberSource remote test [Patrick Joyce]
* Support for Garanti Sanal Pos: Turkish bank and billing gateway [Selem Delul]
* Add deprecation note for Money objects to Bogus gateway [Soleone]
* Updated test URL for Merchant eSolutions and added valid remote test credentials [Soleone]
Expand Down
8 changes: 5 additions & 3 deletions test/remote/gateways/remote_cyber_source_test.rb
Expand Up @@ -126,9 +126,11 @@ def test_failed_capture_bad_auth_info

def test_invalid_login
gateway = CyberSourceGateway.new( :login => '', :password => '' )
assert response = gateway.purchase(@amount, @credit_card, @options)
assert_match /wsse:InvalidSecurity/, response.message
assert_failure response
authentication_exception = assert_raise ActiveMerchant::ResponseError, 'Failed with 500 Internal Server Error' do
gateway.purchase(@amount, @credit_card, @options)
end
assert response = authentication_exception.response
assert_match /wsse:InvalidSecurity/, response.body
end

def test_successful_credit
Expand Down

0 comments on commit 0815ffd

Please sign in to comment.