Reformat the JSON test for Shop/Tax.t
Add JSON tets to Shop/Transaction.t Reindent several methods in SQL/ResultSet.pm add a method for returning a YUI Data Table structure to SQL.pm
This commit is contained in:
parent
94b03aa3f5
commit
4db53bb8ed
5 changed files with 94 additions and 13 deletions
12
t/Shop/Tax.t
12
t/Shop/Tax.t
|
|
@ -607,7 +607,6 @@ is($taxer->calculate($cart), 5.5, 'calculate: simple tax calculation on 2 items
|
|||
|
||||
$session->user({userId=>3});
|
||||
my $json = $taxer->www_getTaxesAsJson();
|
||||
diag $json;
|
||||
ok($json, 'www_getTaxesAsJson returned something');
|
||||
my $jsonTax = JSON::from_json($json);
|
||||
cmp_deeply(
|
||||
|
|
@ -618,9 +617,16 @@ cmp_deeply(
|
|||
totalRecords => 1778,
|
||||
recordsReturned => 25,
|
||||
dir => 'desc',
|
||||
records => array_each({taxId=>ignore, country => 'USA', state=>ignore, city=>ignore, code=>ignore, taxRate=>re('^\d+\.\d+$')}),
|
||||
records => array_each({
|
||||
taxId=>ignore,
|
||||
country => 'USA',
|
||||
state=>ignore,
|
||||
city=>ignore,
|
||||
code=>ignore,
|
||||
taxRate=>re('^\d+\.\d+$')
|
||||
}),
|
||||
},
|
||||
'Check major elements of JSON',
|
||||
'Check major elements of tax JSON',
|
||||
);
|
||||
|
||||
$taxableDonation->purge;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue