Sha256: d01101b127e19216898072fd2abe42f8ad23c14a08f8b8d07155b0217c896fb8

Contents?: true

Size: 719 Bytes

Versions: 30

Compression:

Stored size: 719 Bytes

Contents

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

class GetOrganisationTest < 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 =~ /Organisation$/ }.returns(get_file_as_string("organisation.xml"))          
    end
  end
  
  def test_get_organisation
    result = @gateway.get_organisation
    assert result.success?
    assert !result.response_xml.nil?
    
    assert_equal XeroGateway::Organisation, result.organisation.class
    assert_equal "Demo Company (NZ)", result.organisation.name
  end
end

Version data entries

30 entries across 30 versions & 3 rubygems

Version Path
xero_gateway-2.3.0 test/integration/get_organisation_test.rb
xero_gateway-float-2.1.7 test/integration/get_organisation_test.rb
xero_gateway-float-2.1.6 test/integration/get_organisation_test.rb
xero_gateway-float-2.1.4 test/integration/get_organisation_test.rb
xero_gateway-float-2.1.3 test/integration/get_organisation_test.rb
xero_gateway-float-2.1.1 test/integration/get_organisation_test.rb
xero_gateway-float-2.0.18 test/integration/get_organisation_test.rb
xero_gateway-float-2.0.17 test/integration/get_organisation_test.rb
xero_gateway-float-2.0.16 test/integration/get_organisation_test.rb
xero_gateway-float-2.0.15 test/integration/get_organisation_test.rb
xero_gateway-2.1.0 test/integration/get_organisation_test.rb
xero_gateway-n8vision-2.0.20 test/integration/get_organisation_test.rb
xero_gateway-2.0.19 test/integration/get_organisation_test.rb
xero_gateway-2.0.18 test/integration/get_organisation_test.rb
xero_gateway-2.0.17 test/integration/get_organisation_test.rb
xero_gateway-2.0.16 test/integration/get_organisation_test.rb
xero_gateway-2.0.15 test/integration/get_organisation_test.rb
xero_gateway-2.0.14 test/integration/get_organisation_test.rb
xero_gateway-2.0.13 test/integration/get_organisation_test.rb
xero_gateway-2.0.12 test/integration/get_organisation_test.rb