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

(-)a/t/db_dependent/Koha/SearchEngine/Elasticsearch/QueryBuilder.t (-2 / +9 lines)
Lines 82-88 $se->mock( 'get_elasticsearch_mappings', sub { Link Here
82
});
82
});
83
83
84
subtest 'build_authorities_query_compat() tests' => sub {
84
subtest 'build_authorities_query_compat() tests' => sub {
85
    plan tests => 36;
85
    plan tests => 37;
86
86
87
    my $qb;
87
    my $qb;
88
88
Lines 160-165 subtest 'build_authorities_query_compat() tests' => sub { Link Here
160
        "descending sort parameter properly formed"
160
        "descending sort parameter properly formed"
161
    );
161
    );
162
162
163
    # Authorities type
164
    $query = $qb->build_authorities_query_compat( [ 'mainentry' ],  undef, undef, ['contains'], [$search_term], 'AUTH_TYPE', 'asc' );
165
    is_deeply(
166
        $query->{query}->{bool}->{filter},
167
        { term => { 'authtype' => 'auth_type' } },
168
        "authorities type code is used as filter"
169
    );
170
163
    # Failing case
171
    # Failing case
164
    throws_ok {
172
    throws_ok {
165
        $qb->build_authorities_query_compat( [ 'tomas' ],  undef, undef, ['contains'], [$search_term], 'AUTH_TYPE', 'asc' );
173
        $qb->build_authorities_query_compat( [ 'tomas' ],  undef, undef, ['contains'], [$search_term], 'AUTH_TYPE', 'asc' );
166
- 

Return to bug 23004