|
Lines 20-25
use Modern::Perl;
Link Here
|
| 20 |
|
20 |
|
| 21 |
use MARC::Record; |
21 |
use MARC::Record; |
| 22 |
use C4::Biblio; |
22 |
use C4::Biblio; |
|
|
23 |
use C4::XSLT; |
| 23 |
use Koha::Database; |
24 |
use Koha::Database; |
| 24 |
use Koha::Library; |
25 |
use Koha::Library; |
| 25 |
|
26 |
|
|
Lines 40-46
my $location = 'My Location';
Link Here
|
| 40 |
|
41 |
|
| 41 |
subtest 'General Add, Get and Del tests' => sub { |
42 |
subtest 'General Add, Get and Del tests' => sub { |
| 42 |
|
43 |
|
| 43 |
plan tests => 16; |
44 |
plan tests => 18; |
| 44 |
|
45 |
|
| 45 |
$schema->storage->txn_begin; |
46 |
$schema->storage->txn_begin; |
| 46 |
|
47 |
|
|
Lines 63-68
subtest 'General Add, Get and Del tests' => sub {
Link Here
|
| 63 |
cmp_ok(scalar(@items_infos), '==', 1, "One item for biblionumber."); |
64 |
cmp_ok(scalar(@items_infos), '==', 1, "One item for biblionumber."); |
| 64 |
cmp_ok($items_infos[0]{biblionumber}, '==', $bibnum, "Item has correct biblionumber."); |
65 |
cmp_ok($items_infos[0]{biblionumber}, '==', $bibnum, "Item has correct biblionumber."); |
| 65 |
|
66 |
|
|
|
67 |
C4::Context->set_preference('XSLTResultsDisplay', 'default'); |
| 68 |
C4::Context->set_preference('OPACXSLTResultsDisplay', 'default'); |
| 69 |
C4::Context->clear_syspref_cache(); |
| 70 |
my $record = GetMarcBiblio($bibnum); |
| 71 |
my $html = XSLTParse4Display($bibnum, $record, "OPACXSLTResultsDisplay", \@items_infos); |
| 72 |
ok($html, "XSLTParse4Display( OPACXSLTResultsDisplay )"); |
| 73 |
$html = XSLTParse4Display($bibnum, $record, "XSLTResultsDisplay", \@items_infos); |
| 74 |
ok($html, "XSLTParse4Display( XSLTResultsDisplay )"); |
| 75 |
|
| 76 |
|
| 66 |
# Get item. |
77 |
# Get item. |
| 67 |
my $getitem = GetItem($itemnumber); |
78 |
my $getitem = GetItem($itemnumber); |
| 68 |
cmp_ok($getitem->{'itemnumber'}, '==', $itemnumber, "Retrieved item has correct itemnumber."); |
79 |
cmp_ok($getitem->{'itemnumber'}, '==', $itemnumber, "Retrieved item has correct itemnumber."); |
| 69 |
- |
|
|