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

(-)a/t/db_dependent/Search.t (-3 / +8 lines)
Lines 637-645 ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],' Link Here
637
    ( $error, $query, $simple_query, $query_cgi,
637
    ( $error, $query, $simple_query, $query_cgi,
638
    $query_desc, $limit, $limit_cgi, $limit_desc,
638
    $query_desc, $limit, $limit_cgi, $limit_desc,
639
    $query_type ) = buildQuery([], [ 'ccl=an:42' ], [], ['available'], [], 0, 'en');
639
    $query_type ) = buildQuery([], [ 'ccl=an:42' ], [], ['available'], [], 0, 'en');
640
    is( $query, "an:42 and ( (allrecords,AlwaysMatches='') and (not-onloan-count,st-numeric >= 1) and (lost,st-numeric=0) )", 'buildQuery should add the available part to the query if requested with ccl' );
640
    is( $query, "an:42 and (( (allrecords,AlwaysMatches='') and (not-onloan-count,st-numeric >= 1) and (lost,st-numeric=0) ))", 'buildQuery should add the available part to the query if requested with ccl' );
641
    is( $query_desc, 'an:42', 'buildQuery should remove the available part from the query' );
641
    is( $query_desc, 'an:42', 'buildQuery should remove the available part from the query' );
642
642
643
    ( $error, $query, $simple_query, $query_cgi,
644
    $query_desc, $limit, $limit_cgi, $limit_desc,
645
    $query_type ) = buildQuery([], [ 'ccl=an:42' ], [], ['branch:CPL'], [], 0, 'en');
646
    is( $query, "an:42 and (homebranch: CPL or holdingbranch: CPL)", 'buildQuery should expand the limit as necessary for ccl queries' );
647
    is( $query_desc, 'an:42', 'buildQuery should not add limit to limit desc for ccl queries' );
648
643
    ( $error, $query, $simple_query, $query_cgi,
649
    ( $error, $query, $simple_query, $query_cgi,
644
    $query_desc, $limit, $limit_cgi, $limit_desc,
650
    $query_desc, $limit, $limit_cgi, $limit_desc,
645
    $query_type ) = buildQuery([], [ 0 ], [ 'su,phr' ], [], [], 0, 'en');
651
    $query_type ) = buildQuery([], [ 0 ], [ 'su,phr' ], [], [], 0, 'en');
Lines 903-909 sub run_unimarc_search_tests { Link Here
903
}
909
}
904
910
905
subtest 'MARC21 + DOM' => sub {
911
subtest 'MARC21 + DOM' => sub {
906
    plan tests => 90;
912
    plan tests => 92;
907
    run_marc21_search_tests();
913
    run_marc21_search_tests();
908
};
914
};
909
915
910
- 

Return to bug 30528