Sha256: e0b6f5b42da7441b77722e448263690e664d6f792639c15622c796a1bf8450d8
Contents?: true
Size: 741 Bytes
Versions: 1
Compression:
Stored size: 741 Bytes
Contents
require File.dirname(__FILE__) + '/../test_helper' class CreateContactTest < Test::Unit::TestCase include IntegrationTestMethods def setup @gateway = XeroGateway::Gateway.new( :customer_key => CUSTOMER_KEY, :api_key => API_KEY ) if STUB_XERO_CALLS @gateway.xero_url = "DUMMY_URL" @gateway.stubs(:http_put).with {|url, body, params| url =~ /contact$/ }.returns(get_file_as_string("contact.xml")) end end def test_create_contact example_contact = dummy_contact result = @gateway.create_contact(example_contact) assert result.success? assert !result.contact.contact_id.nil? assert_equal result.contact.name, example_contact.name end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tlconnor-xero_gateway-1.0.2 | test/integration/create_contact_test.rb |