check MIME type for JSON accessor methods in Tax and Transaction
This commit is contained in:
parent
e92017500e
commit
4ef07e2647
2 changed files with 4 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ my $session = WebGUI::Test->session;
|
|||
|
||||
my $addExceptions = getAddExceptions($session);
|
||||
|
||||
my $tests = 79 + 2*scalar(@{$addExceptions});
|
||||
my $tests = 80 + 2*scalar(@{$addExceptions});
|
||||
plan tests => 1 + $tests;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
@ -609,6 +609,7 @@ SKIP: {
|
|||
$session->user({userId=>3});
|
||||
my $json = $taxer->www_getTaxesAsJson();
|
||||
ok($json, 'www_getTaxesAsJson returned something');
|
||||
is($session->http->getMimeType, 'application/json', 'MIME type set to application/json');
|
||||
my $jsonTax = JSON::from_json($json);
|
||||
cmp_deeply(
|
||||
$jsonTax,
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ my $session = WebGUI::Test->session;
|
|||
#----------------------------------------------------------------------------
|
||||
# Tests
|
||||
|
||||
plan tests => 65; # Increment this number for each test you create
|
||||
plan tests => 66; # Increment this number for each test you create
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# put your tests here
|
||||
|
|
@ -186,6 +186,7 @@ is(scalar @{$transaction->getItems}, 0, "can delete items");
|
|||
$session->user({userId=>3});
|
||||
my $json = WebGUI::Shop::Transaction->www_getTransactionsAsJson($session);
|
||||
ok($json, 'www_getTransactionsAsJson returned something');
|
||||
is($session->http->getMimeType, 'application/json', 'MIME type set to application/json');
|
||||
my $jsonTransactions = JSON::from_json($json);
|
||||
cmp_deeply(
|
||||
$jsonTransactions,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue