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

(-)a/t/db_dependent/Search.t (-8 / +12 lines)
Lines 31-36 use Test::MockModule; Link Here
31
use Test::Warn;
31
use Test::Warn;
32
use t::lib::Mocks;
32
use t::lib::Mocks;
33
use t::lib::Mocks::Zebra;
33
use t::lib::Mocks::Zebra;
34
use t::lib::TestBuilder;
34
35
35
use Koha::Caches;
36
use Koha::Caches;
36
37
Lines 678-691 ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],' Link Here
678
679
679
    # make one of the test items appear to be in transit
680
    # make one of the test items appear to be in transit
680
    my $circ_module = Test::MockModule->new('C4::Circulation');
681
    my $circ_module = Test::MockModule->new('C4::Circulation');
681
    $circ_module->mock('GetTransfers', sub {
682
    my $builder = t::lib::TestBuilder->new;
682
        my $itemnumber = shift // -1;
683
    my $transfer = $builder->build(
683
        if ($itemnumber == 11) {
684
        {
684
            return ('2013-07-19', 'MPL', 'CPL');
685
            source => 'Branchtransfer',
685
        } else {
686
            value => {
686
            return;
687
                itemnumber => 11,
688
                frombranch => 'MPL',
689
                tobranch => 'CPL',
690
                datesent => \'NOW()'
691
            }
687
        }
692
        }
688
    });
693
    );
689
694
690
    ($error, $results_hashref, $facets_loop) = getRecords("TEST12121212","TEST12121212",[ ], [ 'biblioserver' ],20,0,\%branches,\%itemtypes,$query_type,0);
695
    ($error, $results_hashref, $facets_loop) = getRecords("TEST12121212","TEST12121212",[ ], [ 'biblioserver' ],20,0,\%branches,\%itemtypes,$query_type,0);
691
    @newresults = searchResults({'interface'=>'intranet'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0,
696
    @newresults = searchResults({'interface'=>'intranet'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0,
692
- 

Return to bug 24295