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

(-)a/t/db_dependent/Search.t (-1 / +12 lines)
Lines 29-34 use open ':std', ':encoding(utf8)'; Link Here
29
use Test::More tests => 3;
29
use Test::More tests => 3;
30
use Test::MockModule;
30
use Test::MockModule;
31
use Test::Warn;
31
use Test::Warn;
32
use Test::DBIx::Class;
32
use t::lib::Mocks;
33
use t::lib::Mocks;
33
use t::lib::Mocks::Zebra;
34
use t::lib::Mocks::Zebra;
34
35
Lines 466-471 ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],' Link Here
466
    ($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,\%branches,\%itemtypes,$query_type,0);
467
    ($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,\%branches,\%itemtypes,$query_type,0);
467
    is($results_hashref->{biblioserver}->{hits}, 2, "getRecords generated availability-limited search matched right number of records");
468
    is($results_hashref->{biblioserver}->{hits}, 2, "getRecords generated availability-limited search matched right number of records");
468
469
470
    my $db = Test::MockModule->new('Koha::Database');
471
    $db->mock( _new_schema => sub { return Schema(); } );
472
    Koha::Database::flush_schema_cache();
473
    fixtures_ok [
474
        Item => [
475
            [qw( itemnumber )],
476
            [ 1 ],
477
            [ 2 ],
478
        ],
479
      ],
480
      'Add items with itemnumber 1 and 2';
469
    @newresults = searchResults({'interface'=>'opac'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0,
481
    @newresults = searchResults({'interface'=>'opac'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0,
470
        $results_hashref->{'biblioserver'}->{"RECORDS"});
482
        $results_hashref->{'biblioserver'}->{"RECORDS"});
471
    my $allavailable = 'true';
483
    my $allavailable = 'true';
472
- 

Return to bug 29697