]> Dogcows Code - chaz/p5-CGI-Ex/blobdiff - t/1_validate_00_base.t
CGI::Ex 2.18
[chaz/p5-CGI-Ex] / t / 1_validate_00_base.t
index 12a1b0c2a5d57d8359f204e97c710ae9ac4d5b6e..e91428ba69b5d737565379952a3f231d980388f8 100644 (file)
@@ -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");
This page took 0.019005 seconds and 4 git commands to generate.