Sha256: cb002a445c65bf849b862ee7837491b7183547753e16bc72f056dce7f26a7330
Contents?: true
Size: 887 Bytes
Versions: 2
Compression:
Stored size: 887 Bytes
Contents
require File.dirname(__FILE__) + '/../test_helper' class GetTrackingCategoriesTest < 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 =~ /tracking$/ }.returns(get_file_as_string("tracking_categories.xml")) end end def test_get_tracking_categories result = @gateway.get_tracking_categories assert result.success? assert !result.response_xml.nil? if STUB_XERO_CALLS # When operating against the Xero test environment, there may not be any tracking categories present, # so this assertion can only be done when operating against stub responses assert result.tracking_categories.size == 2 end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tlconnor-xero_gateway-1.0.3 | test/integration/get_tracking_categories_test.rb |
tlconnor-xero_gateway-1.0.4 | test/integration/get_tracking_categories_test.rb |