Skip to content

Commit dbc8408

Browse files
committedNov 24, 2011
Apparently, InnoDB returns results in a different order than MyISAM tables. Make tax data comparisons be order insensitive for tests.
1 parent e4de128 commit dbc8408

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
 

‎t/Shop/TaxDriver/Generic.t

+8-8
Original file line numberDiff line numberDiff line change
@@ -529,35 +529,35 @@ cmp_deeply(
529529
'importTaxData: error handling for file that does not exist in the filesystem',
530530
);
531531

532-
cmp_deeply(
532+
cmp_bag(
533533
$taxer->getTaxRates($taxingAddress),
534534
[0, 5, 0.5],
535535
'getTaxRates: return correct data for a state with tax data'
536-
);
536+
) or diag Dumper $taxer->getTaxRates($taxingAddress);
537537

538-
cmp_deeply(
538+
cmp_bag(
539539
$taxer->getTaxRates($taxFreeAddress),
540540
[0,0],
541541
'getTaxRates: return correct data for a state with no tax data'
542-
);
542+
) or diag Dumper $taxer->getTaxRates($taxFreeAddress);
543543

544-
cmp_deeply(
544+
cmp_bag(
545545
$taxer->getTaxRates($alternateAddress),
546546
[0.0, 8.25], #Hits USA and Los Angeles, California using the alternate spelling of the state
547547
'getTaxRates: return correct data for a state when the address has alternations'
548-
);
548+
) or diag Dumper $taxer->getTaxRates($alternateAddress);
549549

550550
my $capitalized = $taxer->add({
551551
country => 'USA',
552552
state => 'wi',
553553
taxRate => '50',
554554
});
555555

556-
cmp_deeply(
556+
cmp_bag(
557557
$taxer->getTaxRates($taxingAddress),
558558
[0, 5, 0.5],
559559
'... multiple entries with different capitalization, first matches'
560-
);
560+
) or diag Dumper $taxer->getTaxRates($taxingAddress);
561561

562562
$taxer->delete({ taxId => $capitalized });
563563

0 commit comments

Comments
 (0)
Please sign in to comment.