3 # This Koha test module is a stub!
4 # Add more tests here!!!
8 use Test
::More tests
=> 14;
12 use_ok
('C4::Search::PazPar2');
15 my $obj = C4
::Search
::PazPar2
->new();
16 ok
($obj, "testing new works");
19 warning_like
{ $result = $obj->init(); }
20 qr/400 URL must be absolute at .*C4\/Search\
/PazPar2.pm/,
21 "Expected relative URL warning";
22 is
($result, "1", "testing init returns '1' when given no arguments");
24 warning_like
{ $result = $obj->search(); }
25 qr/400 URL must be absolute at .*C4\/Search\
/PazPar2.pm/,
26 "Expected relative URL warning";
27 is
($result, "1", "testing search returns '1' when given no arguments");
29 warning_like
{ $result = $obj->stat(); }
30 qr/400 URL must be absolute at .*C4\/Search\
/PazPar2.pm/,
31 "Expected relative URL warning";
32 is
($result, undef, "testing stat returns undef when given no arguments");
34 warning_like
{ $result = $obj->show(); }
35 qr/400 URL must be absolute at .*C4\/Search\
/PazPar2.pm/,
36 "Expected relative URL warning";
37 is
($result, undef, "testing show returns undef when given no arguments");
39 warning_like
{ $result = $obj->record(); }
40 qr/400 URL must be absolute at .*C4\/Search\
/PazPar2.pm/,
41 "Expected relative URL warning";
42 is
($result, undef, "testing record returns undef when given no arguments");
44 warning_like
{ $result = $obj->termlist(); }
45 qr/400 URL must be absolute at .*C4\/Search\
/PazPar2.pm/,
46 "Expected relative URL warning";
47 is
($result, undef, "testing termlist returns undef when given no arguments");