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

(-)a/t/db_dependent/Items.t (-2 / +14 lines)
Lines 432-438 subtest q{Test Koha::Database->schema()->resultset('Item')->itemtype()} => sub { Link Here
432
};
432
};
433
433
434
subtest 'SearchItems test' => sub {
434
subtest 'SearchItems test' => sub {
435
    plan tests => 15;
435
    plan tests => 17;
436
436
437
    $schema->storage->txn_begin;
437
    $schema->storage->txn_begin;
438
    my $dbh = C4::Context->dbh;
438
    my $dbh = C4::Context->dbh;
Lines 630-635 subtest 'SearchItems test' => sub { Link Here
630
    ($items, $total_results) = SearchItems($filter);
630
    ($items, $total_results) = SearchItems($filter);
631
    is($total_results, 1, "Search items.issues issues = 0 returns result (items.issues defaults to 0)");
631
    is($total_results, 1, "Search items.issues issues = 0 returns result (items.issues defaults to 0)");
632
632
633
    # Is null
634
    $filter = {
635
        field => 'new_status',
636
        query => 0,
637
        operator => '='
638
    };
639
    ($items, $total_results) = SearchItems($filter);
640
    ok(scalar @$items == 0, 'found no item with new_status=0 without ifnull');
641
642
    $filter->{ifnull} = 0;
643
    ($items, $total_results) = SearchItems($filter);
644
    ok(scalar @$items == 3, 'found all items with new_status=0 with ifnull = 0');
645
633
    $schema->storage->txn_rollback;
646
    $schema->storage->txn_rollback;
634
};
647
};
635
648
636
- 

Return to bug 26032