Lines 21-26
use Modern::Perl;
Link Here
|
21 |
use MARC::Record; |
21 |
use MARC::Record; |
22 |
use C4::Biblio; |
22 |
use C4::Biblio; |
23 |
use C4::Branch; |
23 |
use C4::Branch; |
|
|
24 |
use C4::XSLT; |
24 |
use Koha::Database; |
25 |
use Koha::Database; |
25 |
|
26 |
|
26 |
use Test::More tests => 5; |
27 |
use Test::More tests => 5; |
Lines 35-41
my ($branch1, $branch2) = keys %$branches;
Link Here
|
35 |
|
36 |
|
36 |
subtest 'General Add, Get and Del tests' => sub { |
37 |
subtest 'General Add, Get and Del tests' => sub { |
37 |
|
38 |
|
38 |
plan tests => 8; |
39 |
plan tests => 10; |
39 |
|
40 |
|
40 |
# Start transaction |
41 |
# Start transaction |
41 |
$dbh->{AutoCommit} = 0; |
42 |
$dbh->{AutoCommit} = 0; |
Lines 54-59
subtest 'General Add, Get and Del tests' => sub {
Link Here
|
54 |
cmp_ok(scalar(@items_infos), '==', 1, "One item for biblionumber."); |
55 |
cmp_ok(scalar(@items_infos), '==', 1, "One item for biblionumber."); |
55 |
cmp_ok($items_infos[0]{biblionumber}, '==', $bibnum, "Item has correct biblionumber."); |
56 |
cmp_ok($items_infos[0]{biblionumber}, '==', $bibnum, "Item has correct biblionumber."); |
56 |
|
57 |
|
|
|
58 |
C4::Context->set_preference('XSLTResultsDisplay', 'default'); |
59 |
C4::Context->set_preference('OPACXSLTResultsDisplay', 'default'); |
60 |
C4::Context->clear_syspref_cache(); |
61 |
my $record = GetMarcBiblio($bibnum); |
62 |
my $html = XSLTParse4Display($bibnum, $record, "OPACXSLTResultsDisplay", \@items_infos); |
63 |
ok($html, "XSLTParse4Display( OPACXSLTResultsDisplay )"); |
64 |
$html = XSLTParse4Display($bibnum, $record, "XSLTResultsDisplay", \@items_infos); |
65 |
ok($html, "XSLTParse4Display( XSLTResultsDisplay )"); |
66 |
|
67 |
|
57 |
# Get item. |
68 |
# Get item. |
58 |
my $getitem = GetItem($itemnumber); |
69 |
my $getitem = GetItem($itemnumber); |
59 |
cmp_ok($getitem->{'itemnumber'}, '==', $itemnumber, "Retrieved item has correct itemnumber."); |
70 |
cmp_ok($getitem->{'itemnumber'}, '==', $itemnumber, "Retrieved item has correct itemnumber."); |
60 |
- |
|
|