|
Lines 230-236
subtest 'build_query tests' => sub {
Link Here
|
| 230 |
}; |
230 |
}; |
| 231 |
|
231 |
|
| 232 |
subtest "_convert_sort_fields" => sub { |
232 |
subtest "_convert_sort_fields" => sub { |
| 233 |
plan tests => 1; |
233 |
plan tests => 2; |
| 234 |
my @sort_by = $builder->_convert_sort_fields(qw( call_number_asc author_dsc )); |
234 |
my @sort_by = $builder->_convert_sort_fields(qw( call_number_asc author_dsc )); |
| 235 |
is_deeply( |
235 |
is_deeply( |
| 236 |
\@sort_by, |
236 |
\@sort_by, |
|
Lines 242-254
subtest "_convert_sort_fields" => sub {
Link Here
|
| 242 |
); |
242 |
); |
| 243 |
|
243 |
|
| 244 |
# We could expect this to pass, but direction is undef instead of 'desc' |
244 |
# We could expect this to pass, but direction is undef instead of 'desc' |
| 245 |
#@sort_by = $builder->_convert_sort_fields(qw( call_number_asc author_desc )); |
245 |
@sort_by = $builder->_convert_sort_fields(qw( call_number_asc author_desc )); |
| 246 |
#is_deeply( |
246 |
is_deeply( |
| 247 |
# \@sort_by, |
247 |
\@sort_by, |
| 248 |
# [ |
248 |
[ |
| 249 |
# { field => 'callnum', direction => 'asc' }, |
249 |
{ field => 'callnum', direction => 'asc' }, |
| 250 |
# { field => 'author', direction => 'desc' } |
250 |
{ field => 'author', direction => 'desc' } |
| 251 |
# ], |
251 |
], |
| 252 |
# 'sort fields should have been split correctly' |
252 |
'sort fields should have been split correctly' |
| 253 |
#); |
253 |
); |
| 254 |
}; |
254 |
}; |
| 255 |
- |
|
|