From 444c006aaefd9f5c57bfd508b65b76c262e8e99d Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 30 May 2011 09:30:33 -0700 Subject: [PATCH] Add a test for multiple tax entries with different case. First one wins. --- t/Shop/TaxDriver/Generic.t | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/t/Shop/TaxDriver/Generic.t b/t/Shop/TaxDriver/Generic.t index c566ed138..65e3d163d 100644 --- a/t/Shop/TaxDriver/Generic.t +++ b/t/Shop/TaxDriver/Generic.t @@ -38,7 +38,7 @@ $session->user({userId => 3}); my $addExceptions = getAddExceptions($session); -my $tests = 78 + 2*scalar(@{$addExceptions}); +my $tests = 79 + 2*scalar(@{$addExceptions}); plan tests => $tests; WebGUI::Test->addToCleanup(SQL => 'delete from tax_generic_rates'); @@ -528,6 +528,20 @@ cmp_deeply( 'getTaxRates: return correct data for a state when the address has alternations' ); +my $capitalized = $taxer->add({ + country => 'USA', + state => 'wi', + taxRate => '50', +}); + +cmp_deeply( + $taxer->getTaxRates($taxingAddress), + [0, 5, 0.5], + '... multiple entries with different capitalization, first matches' +); + +$taxer->delete({ taxId => $capitalized }); + ####################################################################### # # calculate