|
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 => 8; |
27 |
use Test::More tests => 8; |
|
Lines 36-42
my ($branch1, $branch2) = keys %$branches;
Link Here
|
| 36 |
|
37 |
|
| 37 |
subtest 'General Add, Get and Del tests' => sub { |
38 |
subtest 'General Add, Get and Del tests' => sub { |
| 38 |
|
39 |
|
| 39 |
plan tests => 8; |
40 |
plan tests => 10; |
| 40 |
|
41 |
|
| 41 |
# Start transaction |
42 |
# Start transaction |
| 42 |
$dbh->{AutoCommit} = 0; |
43 |
$dbh->{AutoCommit} = 0; |
|
Lines 56-61
subtest 'General Add, Get and Del tests' => sub {
Link Here
|
| 56 |
cmp_ok(scalar(@items_infos), '==', 1, "One item for biblionumber."); |
57 |
cmp_ok(scalar(@items_infos), '==', 1, "One item for biblionumber."); |
| 57 |
cmp_ok($items_infos[0]{biblionumber}, '==', $bibnum, "Item has correct biblionumber."); |
58 |
cmp_ok($items_infos[0]{biblionumber}, '==', $bibnum, "Item has correct biblionumber."); |
| 58 |
|
59 |
|
|
|
60 |
C4::Context->set_preference('XSLTResultsDisplay', 'default'); |
| 61 |
C4::Context->set_preference('OPACXSLTResultsDisplay', 'default'); |
| 62 |
C4::Context->clear_syspref_cache(); |
| 63 |
my $record = GetMarcBiblio($bibnum); |
| 64 |
my $html = XSLTParse4Display($bibnum, $record, "OPACXSLTResultsDisplay", \@items_infos); |
| 65 |
ok($html, "XSLTParse4Display( OPACXSLTResultsDisplay )"); |
| 66 |
$html = XSLTParse4Display($bibnum, $record, "XSLTResultsDisplay", \@items_infos); |
| 67 |
ok($html, "XSLTParse4Display( XSLTResultsDisplay )"); |
| 68 |
|
| 69 |
|
| 59 |
# Get item. |
70 |
# Get item. |
| 60 |
my $getitem = GetItem($itemnumber); |
71 |
my $getitem = GetItem($itemnumber); |
| 61 |
cmp_ok($getitem->{'itemnumber'}, '==', $itemnumber, "Retrieved item has correct itemnumber."); |
72 |
cmp_ok($getitem->{'itemnumber'}, '==', $itemnumber, "Retrieved item has correct itemnumber."); |
| 62 |
- |
|
|