Added more unit tests to check when JSONStream should fail.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
(cherry picked from commit 5f0f2e297a)

Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
Zach Sim 2011-01-21 10:46:09 +13:00 committed by Chris Nighswonger
parent 928165875c
commit ab3263e018
1 changed files with 8 additions and 0 deletions

View File

@ -20,3 +20,11 @@ $json->param( stuff => ['realia'] );
is($json->output,'{"issues":["yes!","please","no"],"stuff":["realia"]}',"Making sure JSON output has added more params correctly.");
$json->param( stuff => ['fun','love'] );
is($json->output,'{"issues":["yes!","please","no"],"stuff":["fun","love"]}',"Making sure JSON output can obverwrite params.");
eval{$json->param( die )};
ok($@,'Dies');
eval{$json->param( die => ['yes','sure','now'])};
ok(!$@,'Dosent die.');
eval{$json->param( die => ['yes','sure','now'], die2 =>)};
ok($@,'Dies.');