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 686-699 ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],' Link Here
686
687
687
    # make one of the test items appear to be in transit
688
    # make one of the test items appear to be in transit
688
    my $circ_module = Test::MockModule->new('C4::Circulation');
689
    my $circ_module = Test::MockModule->new('C4::Circulation');
689
    $circ_module->mock('GetTransfers', sub {
690
    my $builder = t::lib::TestBuilder->new;
690
        my $itemnumber = shift // -1;
691
    my $transfer = $builder->build(
691
        if ($itemnumber == 11) {
692
        {
692
            return ('2013-07-19', 'MPL', 'CPL');
693
            source => 'Branchtransfer',
693
        } else {
694
            value => {
694
            return;
695
                itemnumber => 11,
696
                frombranch => 'MPL',
697
                tobranch => 'CPL',
698
                datesent => \'NOW()'
699
            }
695
        }
700
        }
696
    });
701
    );
697
702
698
    ($error, $results_hashref, $facets_loop) = getRecords("TEST12121212","TEST12121212",[ ], [ 'biblioserver' ],20,0,\%branches,\%itemtypes,$query_type,0);
703
    ($error, $results_hashref, $facets_loop) = getRecords("TEST12121212","TEST12121212",[ ], [ 'biblioserver' ],20,0,\%branches,\%itemtypes,$query_type,0);
699
    @newresults = searchResults({'interface'=>'intranet'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0,
704
    @newresults = searchResults({'interface'=>'intranet'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0,
700
- 

Return to bug 24295