|
Lines 77-83
get '/biblios' => sub {
Link Here
|
| 77 |
|
77 |
|
| 78 |
|
78 |
|
| 79 |
# The tests |
79 |
# The tests |
| 80 |
use Test::More tests => 9; |
80 |
use Test::More tests => 10; |
| 81 |
use Test::Mojo; |
81 |
use Test::Mojo; |
| 82 |
|
82 |
|
| 83 |
use t::lib::TestBuilder; |
83 |
use t::lib::TestBuilder; |
|
Lines 206-211
subtest 'objects.search helper, sorting on mapped column' => sub {
Link Here
|
| 206 |
$schema->storage->txn_rollback; |
206 |
$schema->storage->txn_rollback; |
| 207 |
}; |
207 |
}; |
| 208 |
|
208 |
|
|
|
209 |
subtest 'objects.search helper, encoding' => sub { |
| 210 |
|
| 211 |
plan tests => 5; |
| 212 |
|
| 213 |
$schema->storage->txn_begin; |
| 214 |
|
| 215 |
Koha::Cities->delete; |
| 216 |
|
| 217 |
$builder->build_object({ class => 'Koha::Cities', value => { city_name => 'A', city_country => 'Argentina' } }); |
| 218 |
$builder->build_object({ class => 'Koha::Cities', value => { city_name => 'B', city_country => '❤Argentina❤' } }); |
| 219 |
|
| 220 |
$t->get_ok('/cities?country=❤') |
| 221 |
->status_is(200) |
| 222 |
->json_has('/0') |
| 223 |
->json_hasnt('/1') |
| 224 |
->json_is('/0/name' => 'B'); |
| 225 |
|
| 226 |
$schema->storage->txn_rollback; |
| 227 |
}; |
| 228 |
|
| 209 |
subtest 'objects.search helper, embed' => sub { |
229 |
subtest 'objects.search helper, embed' => sub { |
| 210 |
|
230 |
|
| 211 |
plan tests => 2; |
231 |
plan tests => 2; |
|
Lines 363-366
subtest 'object.search helper order by embedded columns' => sub {
Link Here
|
| 363 |
->json_is('/biblios/1/biblio_id' => $biblio1->biblionumber, 'Biblio 1 should be second'); |
383 |
->json_is('/biblios/1/biblio_id' => $biblio1->biblionumber, 'Biblio 1 should be second'); |
| 364 |
|
384 |
|
| 365 |
$schema->storage->txn_begin; |
385 |
$schema->storage->txn_begin; |
| 366 |
} |
386 |
} |
| 367 |
- |
|
|