forked from Koha-Community/Koha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSearch_PazPar2.t
executable file
·47 lines (37 loc) · 1.54 KB
/
Search_PazPar2.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/perl
#
# This Koha test module is a stub!
# Add more tests here!!!
use Modern::Perl;
use Test::More tests => 14;
use Test::Warn;
BEGIN {
use_ok('C4::Search::PazPar2');
}
my $obj = C4::Search::PazPar2->new();
ok ($obj, "testing new works");
my $result;
warning_like { $result = $obj->init(); }
qr/400 URL must be absolute at .*C4\/Search\/PazPar2.pm/,
"Expected relative URL warning";
is ($result, "1", "testing init returns '1' when given no arguments");
warning_like { $result = $obj->search(); }
qr/400 URL must be absolute at .*C4\/Search\/PazPar2.pm/,
"Expected relative URL warning";
is ($result, "1", "testing search returns '1' when given no arguments");
warning_like { $result = $obj->stat(); }
qr/400 URL must be absolute at .*C4\/Search\/PazPar2.pm/,
"Expected relative URL warning";
is ($result, undef, "testing stat returns undef when given no arguments");
warning_like { $result = $obj->show(); }
qr/400 URL must be absolute at .*C4\/Search\/PazPar2.pm/,
"Expected relative URL warning";
is ($result, undef, "testing show returns undef when given no arguments");
warning_like { $result = $obj->record(); }
qr/400 URL must be absolute at .*C4\/Search\/PazPar2.pm/,
"Expected relative URL warning";
is ($result, undef, "testing record returns undef when given no arguments");
warning_like { $result = $obj->termlist(); }
qr/400 URL must be absolute at .*C4\/Search\/PazPar2.pm/,
"Expected relative URL warning";
is ($result, undef, "testing termlist returns undef when given no arguments");