Add a test for multiple tax entries with different case. First one wins.

This commit is contained in:
Colin Kuskie 2011-05-30 09:30:33 -07:00
parent 76a69c979f
commit 444c006aae

View file

@ -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