X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=t%2F1-config.t;h=dae78d5e7b1eb37f54e9dc6d89dea3b32963e656;hb=af0dcffdc5f46d7a1f5215d33875927dd435b9a1;hp=f7ff11e5cc229dd17a9afba7debdb3771cffc902;hpb=4232b594b00446dae459263e969a591cf3a14747;p=webpac2 diff --git a/t/1-config.t b/t/1-config.t index f7ff11e..dae78d5 100755 --- a/t/1-config.t +++ b/t/1-config.t @@ -1,7 +1,7 @@ #!/usr/bin/perl -w use strict; -use Test::More tests => 12; +use Test::More tests => 28; use Test::Exception; use blib; @@ -40,3 +40,11 @@ my @inputs = $config->webpac('inputs'); diag "inputs = ",dump( @inputs ) if ($debug); isa_ok(\@inputs, 'ARRAY', "inputs"); cmp_ok(@inputs, '==', 2, "got 2 webpac inputs"); + +$config->iterate_inputs(sub { + my ($input,$database,$db_config) = @_; + isa_ok($input, 'HASH', 'input'); + ok($database, 'database'); + isa_ok($db_config, 'HASH', 'database config'); + isa_ok($input->{normalize}, 'ARRAY', 'normalize'); +});