View | Details | Raw Unified | Return to bug 14117
Collapse All | Expand All

(-)a/t/Search_PazPar2.t (-10 / +34 lines)
Lines 3-12 Link Here
3
# This Koha test module is a stub!  
3
# This Koha test module is a stub!  
4
# Add more tests here!!!
4
# Add more tests here!!!
5
5
6
use strict;
6
use Modern::Perl;
7
use warnings;
8
7
9
use Test::More tests => 8;
8
use Test::More tests => 14;
9
use Test::Warn;
10
10
11
BEGIN {
11
BEGIN {
12
        use_ok('C4::Search::PazPar2');
12
        use_ok('C4::Search::PazPar2');
Lines 14-22 BEGIN { Link Here
14
14
15
my $obj = C4::Search::PazPar2->new();
15
my $obj = C4::Search::PazPar2->new();
16
ok ($obj, "testing new works");
16
ok ($obj, "testing new works");
17
is ($obj->init(), "1", "testing init returns '1' when given no arguments");
17
18
is ($obj->search(), "1", "testing search returns '1' when given no arguments");
18
my $result;
19
is ($obj->stat(), undef, "testing stat returns undef when given no arguments");
19
warning_like { $result = $obj->init(); }
20
is ($obj->show(), undef, "testing show returns undef when given no arguments");
20
    qr/400 URL must be absolute at .*C4\/Search\/PazPar2.pm/,
21
is ($obj->record(), undef, "testing record returns undef when given no arguments");
21
    "Expected relative URL warning";
22
is ($obj->termlist(), undef, "testing termlist returns undef when given no arguments");
22
is ($result, "1", "testing init returns '1' when given no arguments");
23
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");
28
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");
33
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");
38
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");
43
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");
23
- 

Return to bug 14117