./test/general/transporter_test.rb in exact4r-0.9.3 vs ./test/general/transporter_test.rb in exact4r-1.0

- old
+ new

@@ -8,13 +8,13 @@ :amount => "10.13", :cardholder_name => "Simon Brown", :cc_number => "4111111111111111", :cc_expiry => "1012", :reference_no => "987987", - }.merge(EMERGIS_BASIC_AUTH)) + }.merge(@@credentials.current_gateway)) - tr = ::EWS::Transporter.new(LOCATION) + tr = ::EWS::Transporter.new(@@credentials.config['location']) # should raise an exception when transport_type is not one of :json, :rest or :soap assert_raises(ArgumentError) { tr.submit(txn, :banana) } @@ -26,25 +26,25 @@ :amount => "10.13", :cardholder_name => "Simon Brown", :cc_number => "4111111111111111", :cc_expiry => "1012", :reference_no => "987987", - }.merge(EMERGIS_BASIC_AUTH)) + }.merge(@@credentials.current_gateway)) assert_nothing_raised { - tr = ::EWS::Transporter.new(LOCATION) + tr = ::EWS::Transporter.new(@@credentials.config['location']) tr.submit(txn) } end def test_returns_response_object_on_server_failure req = ::EWS::Transaction::Request.new({ :transaction_type => :transaction_details - }.merge(EMERGIS_BASIC_AUTH)) + }.merge(@@credentials.current_gateway)) req.transaction_tag = 9000 # non-existent txn - tr = ::EWS::Transporter.new(LOCATION) + tr = ::EWS::Transporter.new(@@credentials.config['location']) resp = tr.submit(req, :json) assert_not_nil resp assert_equal 404, resp.error_number assert_equal "Not Found", resp.error_description