Sha256: 0a842cc2c7a4ea4b33126e189061ba62cce8bd636a1df580862e8b0e90570cac
Contents?: true
Size: 959 Bytes
Versions: 11
Compression:
Stored size: 959 Bytes
Contents
require File.dirname(__FILE__) + '/../test_helper' class ResponseTest < Test::Unit::TestCase def test_response_success assert Response.new(true, 'message', :param => 'value').success? assert !Response.new(false, 'message', :param => 'value').success? end def test_get_params response = Response.new(true, 'message', :param => 'value') assert_equal ['param'], response.params.keys end def test_avs_result response = Response.new(true, 'message', {}, :avs_result => { :code => 'A', :street_match => 'Y', :zip_match => 'N' }) avs_result = response.avs_result assert_equal 'A', avs_result['code'] assert_equal AVSResult.messages['A'], avs_result['message'] end def test_cvv_result response = Response.new(true, 'message', {}, :cvv_result => 'M') cvv_result = response.cvv_result assert_equal 'M', cvv_result['code'] assert_equal CVVResult.messages['M'], cvv_result['message'] end end
Version data entries
11 entries across 11 versions & 5 rubygems