./test/test_helper.rb in exact4r-1.2 vs ./test/test_helper.rb in exact4r-1.4
- old
+ new
@@ -36,23 +36,25 @@
}.merge(@@credentials.current_gateway)
end
def assert_details_correct(request, response)
assert_not_nil response, "response should not be nil"
- assert response.approved?, "#{response.error_number} / #{response.error_description} / #{response.exact_message} / #{response.bank_message}"
+ assert response.approved?, "#{response.error_number} / #{response.error_description} / #{response.exact_resp_code} / #{response.exact_message} / #{response.bank_message}"
assert_not_nil response.transaction_tag
assert_not_nil response.authorization_num
assert_equal request.amount.to_s, response.amount.to_s
assert_card_details response
end
def assert_card_details(response)
- assert_match /............1111/, response.cc_number
- assert_equal TEST_CARD_HOLDER, response.cardholder_name
- assert_equal TEST_CARD_EXPIRY, response.cc_expiry unless %w(35 50 54).include?(response.transaction_type)
+ unless %w(35 50 54).include?(response.transaction_type)
+ assert_match /............1111/, response.cc_number
+ assert_equal TEST_CARD_HOLDER, response.cardholder_name
+ assert_equal TEST_CARD_EXPIRY, response.cc_expiry
+ end
end
def basic_params(options = {})
{
:transaction_type => :purchase,
\ No newline at end of file