Bug 21233: Add Koha::Exceptions::Password
[koha.git] / t / Search_PazPar2.t
blob62b622d97afbe3005234cccd42c8b87324769ba6
1 #!/usr/bin/perl
3 # This Koha test module is a stub!
4 # Add more tests here!!!
6 use Modern::Perl;
8 use Test::More tests => 14;
9 use Test::Warn;
11 BEGIN {
12 use_ok('C4::Search::PazPar2');
15 my $obj = C4::Search::PazPar2->new();
16 ok ($obj, "testing new works");
18 my $result;
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");