mirror of
https://codeberg.org/scip/Data-Validate-Struct.git
synced 2025-12-16 20:21:02 +01:00
added check for not caching errors
This commit is contained in:
6
t/run.t
6
t/run.t
@@ -395,5 +395,11 @@ $v3->type(noob => sub { return $_[0] == 42 });
|
||||
|
||||
ok($v3->validate($cfg3), "using custom types");
|
||||
|
||||
|
||||
# check if errors are not cached
|
||||
my $v4 = Data::Validate::Struct->new({age => 'int'});
|
||||
ok(!$v4->validate({age => 'eight'}), "cache check first run, error");
|
||||
ok($v4->validate({age => 8}), "cache check second run, no error");
|
||||
|
||||
done_testing();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user