Sha256: e5ca2f1d2ab590cced68a4a1163833f23b67a4f05e3eda94be86e9b0a8a26788

Contents?: true

Size: 664 Bytes

Versions: 34

Compression:

Stored size: 664 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class GetAccountsTest < Test::Unit::TestCase
  include TestHelper
  
  def setup
    @gateway = XeroGateway::Gateway.new(CONSUMER_KEY, CONSUMER_SECRET)
    
    if STUB_XERO_CALLS
      @gateway.xero_url = "DUMMY_URL"
      
      @gateway.stubs(:http_get).with {|client, 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

34 entries across 34 versions & 3 rubygems

Version Path
xero_gateway-2.7.0 test/integration/get_accounts_test.rb
xero_gateway-2.6.0 test/integration/get_accounts_test.rb
xero_gateway-2.5.0 test/integration/get_accounts_test.rb
xero_gateway-2.4.0 test/integration/get_accounts_test.rb
xero_gateway-2.3.0 test/integration/get_accounts_test.rb
xero_gateway-float-2.1.7 test/integration/get_accounts_test.rb
xero_gateway-float-2.1.6 test/integration/get_accounts_test.rb
xero_gateway-float-2.1.4 test/integration/get_accounts_test.rb
xero_gateway-float-2.1.3 test/integration/get_accounts_test.rb
xero_gateway-float-2.1.1 test/integration/get_accounts_test.rb
xero_gateway-float-2.0.18 test/integration/get_accounts_test.rb
xero_gateway-float-2.0.17 test/integration/get_accounts_test.rb
xero_gateway-float-2.0.16 test/integration/get_accounts_test.rb
xero_gateway-float-2.0.15 test/integration/get_accounts_test.rb
xero_gateway-2.1.0 test/integration/get_accounts_test.rb
xero_gateway-n8vision-2.0.20 test/integration/get_accounts_test.rb
xero_gateway-2.0.19 test/integration/get_accounts_test.rb
xero_gateway-2.0.18 test/integration/get_accounts_test.rb
xero_gateway-2.0.17 test/integration/get_accounts_test.rb
xero_gateway-2.0.16 test/integration/get_accounts_test.rb