Sha256: 28d4a69178b1db0c88ffb479a183c23b9ddb9412f2fcc7540cd55cddf5efa230
Contents?: true
Size: 695 Bytes
Versions: 2
Compression:
Stored size: 695 Bytes
Contents
require File.dirname(__FILE__) + '/../test_helper' class GetAccountsTest < Test::Unit::TestCase include TestHelper 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_get).with {|url, params| url =~ /accounts$/ }.returns(get_file_as_string("accounts.xml")) end end def test_get_accounts result = @gateway.get_accounts assert result.success? assert !result.response_xml.nil? assert result.accounts.size > 0 assert_equal XeroGateway::Account, result.accounts.first.class end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tlconnor-xero_gateway-1.0.3 | test/integration/get_accounts_test.rb |
tlconnor-xero_gateway-1.0.4 | test/integration/get_accounts_test.rb |