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

(-)a/t/db_dependent/Koha/Biblio.t (-2 / +22 lines)
Lines 915-921 subtest 'get_marc_notes() UNIMARC tests' => sub { Link Here
915
};
915
};
916
916
917
subtest 'host_items() tests' => sub {
917
subtest 'host_items() tests' => sub {
918
    plan tests => 7;
918
    plan tests => 8;
919
919
920
    $schema->storage->txn_begin;
920
    $schema->storage->txn_begin;
921
921
Lines 946-951 subtest 'host_items() tests' => sub { Link Here
946
    is_deeply( [ $host_items->get_column('itemnumber') ],
946
    is_deeply( [ $host_items->get_column('itemnumber') ],
947
        [ $host_item_1->itemnumber, $host_item_2->itemnumber ] );
947
        [ $host_item_1->itemnumber, $host_item_2->itemnumber ] );
948
948
949
    my $transfer = $builder->build_object(
950
        {
951
            class => 'Koha::Item::Transfers',
952
            value => {
953
                itemnumber => $host_item_1->itemnumber,
954
                frombranch => $host_item_1->holdingbranch,
955
            }
956
        }
957
    );
958
    ok(
959
        $host_items->search(
960
            {},
961
            {
962
                join     => 'branchtransfers',
963
                order_by => 'branchtransfers.daterequested'
964
            }
965
        )->as_list,
966
        "host_items can be used with a join query on itemnumber"
967
    );
968
    $transfer->delete;
969
949
    t::lib::Mocks::mock_preference( 'EasyAnalyticalRecords', 0 );
970
    t::lib::Mocks::mock_preference( 'EasyAnalyticalRecords', 0 );
950
    $host_items = $biblio->host_items;
971
    $host_items = $biblio->host_items;
951
    is( ref($host_items),   'Koha::Items' );
972
    is( ref($host_items),   'Koha::Items' );
952
- 

Return to bug 36317