./test/general/avs_test.rb in exact4r-0.9.3 vs ./test/general/avs_test.rb in exact4r-1.0
- old
+ new
@@ -33,48 +33,48 @@
def test_encodes_for_paymentech
tx_params = basic_params.merge(:avs_test_flag => nil,
:avs_street_address => '1234567LOUGHEEDHIGHW',
:avs_unit_no => nil,
:avs_po_box => nil,
- :avs_postal_code => '902101234').merge(CHASE_BASIC_AUTH)
+ :avs_postal_code => '902101234').merge(@@credentials.chase)
r = EWS::Transaction::Request.new(tx_params)
assert_equal '1234567LOUGHEEDHIGHW|902101234', r.cc_verification_str1
- resp = EWS::Transporter.new(LOCATION).submit(r)
+ resp = EWS::Transporter.new(@@credentials.config['location']).submit(r)
assert_equal r.cc_verification_str1, resp.cc_verification_str1
end
def test_uses_default_avs_string
tx_params = basic_params.merge(:avs_test_flag => nil,
:avs_street_address => '1234567LOUGHEEDHIGHW',
:avs_unit_no => nil,
:avs_po_box => nil,
- :avs_postal_code => '902101234').merge(EMERGIS_BASIC_AUTH)
+ :avs_postal_code => '902101234').merge(@@credentials.emergis)
r = EWS::Transaction::Request.new(tx_params)
- resp = EWS::Transporter.new(LOCATION).submit(r)
+ resp = EWS::Transporter.new(@@credentials.config['location']).submit(r)
assert_equal '1234567LOUGHEEDHIGHW902101234', resp.cc_verification_str1
end
def test_space_with_numerals_for_tsys
- transporter = EWS::Transporter.new(LOCATION)
+ transporter = EWS::Transporter.new(@@credentials.config['location'])
# should put space between numeral and zip code for Tsys
tx_params = basic_params.merge(:avs_test_flag => nil,
:avs_street_address => nil,
:avs_unit_no => nil,
:avs_po_box => 'P.O.BOX24356',
- :avs_postal_code => '902101234').merge(VITAL_BASIC_AUTH)
+ :avs_postal_code => '902101234').merge(@@credentials.tsys)
r = EWS::Transaction::Request.new(tx_params)
resp = transporter.submit(r)
assert_equal 'P.O.BOX24356 902101234', resp.cc_verification_str1
# should not put space if no numerals for Tsys
tx_params = basic_params.merge(:avs_test_flag => nil,
:avs_street_address => '1234567LOUGHEEDHIGHW',
:avs_unit_no => nil,
:avs_po_box => nil,
- :avs_postal_code => '902101234').merge(EMERGIS_BASIC_AUTH)
+ :avs_postal_code => '902101234').merge(@@credentials.emergis)
r = EWS::Transaction::Request.new(tx_params)
resp = transporter.submit(r)
assert_equal '1234567LOUGHEEDHIGHW902101234', resp.cc_verification_str1
end
\ No newline at end of file