Sha256: 30e815f2b01eb16a2792a6eb9c1ad9b4b207a582c0389aa9166ebb9b55efde6c
Contents?: true
Size: 953 Bytes
Versions: 31
Compression:
Stored size: 953 Bytes
Contents
require File.dirname(__FILE__) + '/../test_helper' class GetTrackingCategoriesTest < 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 =~ /TrackingCategories$/ }.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_equal 1, result.tracking_categories.size assert_equal 4, result.tracking_categories.first.options.size end end end
Version data entries
31 entries across 31 versions & 3 rubygems