Sha256: 051422ad9ab5c3cc555b07f7504c39e362d54253ba88f11cedab77a624c454df
Contents?: true
Size: 715 Bytes
Versions: 4
Compression:
Stored size: 715 Bytes
Contents
require File.dirname(__FILE__) + '/../test_helper' class GetTaxRatesTest < 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 =~ /TaxRates$/ }.returns(get_file_as_string("tax_rates.xml")) end end def test_get_tax_rates result = @gateway.get_tax_rates assert result.success? assert !result.response_xml.nil? assert result.tax_rates.size > 0 assert_equal XeroGateway::TaxRate, result.tax_rates.first.class assert_equal "15% GST on Expenses", result.tax_rates.first.name end end
Version data entries
4 entries across 4 versions & 1 rubygems