Sha256: 0f431bff0e9361ef7a9d90c5ba07ba3e1a0328ffab9f9bb35e973936e5ef3e5b
Contents?: true
Size: 757 Bytes
Versions: 1
Compression:
Stored size: 757 Bytes
Contents
require File.dirname(__FILE__) + '/../test_helper' class CreateInvoiceTest < 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 =~ /invoice$/ }.returns(get_file_as_string("invoice.xml")) end end def test_create_invoice example_invoice = dummy_invoice result = @gateway.create_invoice(example_invoice) assert result.success? assert !result.invoice.invoice_id.nil? assert result.invoice.invoice_number == example_invoice.invoice_number end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tlconnor-xero_gateway-1.0.2 | test/integration/create_invoice_test.rb |