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

(-)a/t/db_dependent/Items.t (-2 / +12 lines)
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 => 6;
27
use Test::More tests => 6;
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 55-60 subtest 'General Add, Get and Del tests' => sub { Link Here
55
    cmp_ok(scalar(@items_infos), '==', 1, "One item for biblionumber.");
56
    cmp_ok(scalar(@items_infos), '==', 1, "One item for biblionumber.");
56
    cmp_ok($items_infos[0]{biblionumber}, '==', $bibnum, "Item has correct biblionumber.");
57
    cmp_ok($items_infos[0]{biblionumber}, '==', $bibnum, "Item has correct biblionumber.");
57
58
59
    C4::Context->set_preference('XSLTResultsDisplay', 'default');
60
    C4::Context->set_preference('OPACXSLTResultsDisplay', 'default');
61
    C4::Context->clear_syspref_cache();
62
    my $record = GetMarcBiblio($bibnum);
63
    my $html = XSLTParse4Display($bibnum, $record, "OPACXSLTResultsDisplay", \@items_infos);
64
    ok($html, "XSLTParse4Display( OPACXSLTResultsDisplay )");
65
    $html = XSLTParse4Display($bibnum, $record, "XSLTResultsDisplay", \@items_infos);
66
    ok($html, "XSLTParse4Display( XSLTResultsDisplay )");
67
68
58
    # Get item.
69
    # Get item.
59
    my $getitem = GetItem($itemnumber);
70
    my $getitem = GetItem($itemnumber);
60
    cmp_ok($getitem->{'itemnumber'}, '==', $itemnumber, "Retrieved item has correct itemnumber.");
71
    cmp_ok($getitem->{'itemnumber'}, '==', $itemnumber, "Retrieved item has correct itemnumber.");
61
- 

Return to bug 11213