Skip to content

Commit

Permalink
Add a test for multiple tax entries with different case. First one wins.
Browse files Browse the repository at this point in the history
  • Loading branch information
perlDreamer committed May 30, 2011
1 parent 76a69c9 commit 444c006
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion t/Shop/TaxDriver/Generic.t
Expand Up @@ -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');
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 444c006

Please sign in to comment.