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

(-)a/t/db_dependent/Koha_SearchEngine_Elasticsearch_Search.t (-2 / +24 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 12;
20
use Test::More tests => 13;
21
use t::lib::Mocks;
21
use t::lib::Mocks;
22
22
23
use Koha::SearchEngine::Elasticsearch::QueryBuilder;
23
use Koha::SearchEngine::Elasticsearch::QueryBuilder;
Lines 208-210 subtest 'build_query tests' => sub { Link Here
208
    );
208
    );
209
};
209
};
210
210
211
- 
211
subtest "_convert_sort_fields" => sub {
212
    plan tests => 1;
213
    my @sort_by = $builder->_convert_sort_fields(qw( call_number_asc author_dsc ));
214
    is_deeply(
215
        \@sort_by,
216
        [
217
            { field => 'callnum', direction => 'asc' },
218
            { field => 'author',  direction => 'desc' }
219
        ],
220
        'sort fields should have been split correctly'
221
    );
222
223
    # We could expect this to pass, but direction is undef instead of 'desc'
224
    #@sort_by = $builder->_convert_sort_fields(qw( call_number_asc author_desc ));
225
    #is_deeply(
226
    #    \@sort_by,
227
    #    [
228
    #        { field => 'callnum', direction => 'asc' },
229
    #        { field => 'author',  direction => 'desc' }
230
    #    ],
231
    #    'sort fields should have been split correctly'
232
    #);
233
};

Return to bug 19564