X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-CGI-Ex;a=blobdiff_plain;f=t%2F1_validate_00_base.t;h=e91428ba69b5d737565379952a3f231d980388f8;hp=12a1b0c2a5d57d8359f204e97c710ae9ac4d5b6e;hb=18123183bfb2737ea337306c9d705fca5b5e50d6;hpb=b6e904ff7b346908d0662aae9a9c5f7d976dd85e diff --git a/t/1_validate_00_base.t b/t/1_validate_00_base.t index 12a1b0c..e91428b 100644 --- a/t/1_validate_00_base.t +++ b/t/1_validate_00_base.t @@ -7,7 +7,7 @@ =cut use strict; -use Test::More tests => 3; +use Test::More tests => 5; use_ok('CGI::Ex::Validate'); @@ -37,3 +37,14 @@ $form = { $err_obj = CGI::Ex::Validate::validate($form,$val); ok($err_obj, "Successfully failed"); + +###----------------------------------------------------------------### + +eval { CGI::Ex::Validate::validate($form,undef) }; +ok($@, "Needs to have a hashref"); + +###----------------------------------------------------------------### + +$err_obj = CGI::Ex::Validate::validate($form,{}); + +ok(!$err_obj, "OK with empty hash");