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

(-)a/t/db_dependent/Items.t (-2 / +12 lines)
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 66-71 subtest 'General Add, Get and Del tests' => sub { Link Here
66
    cmp_ok(scalar(@items_infos), '==', 1, "One item for biblionumber.");
67
    cmp_ok(scalar(@items_infos), '==', 1, "One item for biblionumber.");
67
    cmp_ok($items_infos[0]{biblionumber}, '==', $bibnum, "Item has correct biblionumber.");
68
    cmp_ok($items_infos[0]{biblionumber}, '==', $bibnum, "Item has correct biblionumber.");
68
69
70
    C4::Context->set_preference('XSLTResultsDisplay', 'default');
71
    C4::Context->set_preference('OPACXSLTResultsDisplay', 'default');
72
    C4::Context->clear_syspref_cache();
73
    my $record = GetMarcBiblio($bibnum);
74
    my $html = XSLTParse4Display($bibnum, $record, "OPACXSLTResultsDisplay", \@items_infos);
75
    ok($html, "XSLTParse4Display( OPACXSLTResultsDisplay )");
76
    $html = XSLTParse4Display($bibnum, $record, "XSLTResultsDisplay", \@items_infos);
77
    ok($html, "XSLTParse4Display( XSLTResultsDisplay )");
78
79
69
    # Get item.
80
    # Get item.
70
    my $getitem = GetItem($itemnumber);
81
    my $getitem = GetItem($itemnumber);
71
    cmp_ok($getitem->{'itemnumber'}, '==', $itemnumber, "Retrieved item has correct itemnumber.");
82
    cmp_ok($getitem->{'itemnumber'}, '==', $itemnumber, "Retrieved item has correct itemnumber.");
72
- 

Return to bug 11213