r9065@llin: dpavlin | 2005-11-23 01:15:39 +0100
[webpac2] / t / 1-lookup.t
index cd7b4f2..7522e8c 100755 (executable)
@@ -11,7 +11,7 @@ BEGIN {
 use_ok( 'WebPAC::Lookup' );
 }
 
-throws_ok { new WebPAC::Lookup() } qr/lookup_file/, "new without lookup_file";
+throws_ok { new WebPAC::Lookup( no_log => 1 ) } qr/lookup_file/, "new without lookup_file";
 
 ok(my $lookup = new WebPAC::Lookup(
        lookup_file => 'conf/lookup/example.pm',
@@ -33,7 +33,7 @@ diag "testing WebPAC::Lookup own methods";
 
 ok($lookup->add( $rec ), "add");
 
-ok($lookup->{'lookup'}, "have lookup hash");
+ok($lookup->{'_lookup_data'}, "have lookup hash");
 
 my $lookup_res = { 
        '800:foo' => [ 'bar' ],
@@ -41,7 +41,7 @@ my $lookup_res = {
        '900:bar' => [ 'FOO', 'foo' ]
 };
 
-is_deeply($lookup_res, $lookup->{'lookup'}, "lookup data");
+is_deeply($lookup_res, $lookup->{'_lookup_data'}, "lookup data");
 
 foreach my $k (keys %{ $lookup_res }) {
        ok(my @l = $lookup->lookup("lookup{$k}"), "lookup{$k}");