|
Lines 140-146
my @categories = Koha::AuthorisedValues->new->categories;
Link Here
|
| 140 |
is( @categories, @existing_categories+3, 'There should have 3 categories inserted' ); |
140 |
is( @categories, @existing_categories+3, 'There should have 3 categories inserted' ); |
| 141 |
|
141 |
|
| 142 |
subtest 'search_by_*_field + find_by_koha_field + get_description' => sub { |
142 |
subtest 'search_by_*_field + find_by_koha_field + get_description' => sub { |
| 143 |
plan tests => 5; |
143 |
plan tests => 6; |
| 144 |
|
144 |
|
| 145 |
my $test_cat = Koha::AuthorisedValueCategories->find('TEST'); |
145 |
my $test_cat = Koha::AuthorisedValueCategories->find('TEST'); |
| 146 |
$test_cat->delete if $test_cat; |
146 |
$test_cat->delete if $test_cat; |
|
Lines 248-253
subtest 'search_by_*_field + find_by_koha_field + get_description' => sub {
Link Here
|
| 248 |
], |
248 |
], |
| 249 |
); |
249 |
); |
| 250 |
}; |
250 |
}; |
|
|
251 |
subtest 'get_description_by_category_and_authorised_value' => sub { |
| 252 |
plan tests => 1; |
| 253 |
my $description = Koha::AuthorisedValues->get_description_by_category_and_authorised_value( |
| 254 |
{ |
| 255 |
category => $av_0->category,, |
| 256 |
authorised_value => $av_0->authorised_value, |
| 257 |
} |
| 258 |
); |
| 259 |
is_deeply( |
| 260 |
$description, |
| 261 |
{ |
| 262 |
lib => $av_0->lib, |
| 263 |
opac_description => $av_0->lib_opac |
| 264 |
} |
| 265 |
); |
| 266 |
}; |
| 251 |
}; |
267 |
}; |
| 252 |
|
268 |
|
| 253 |
$schema->storage->txn_rollback; |
269 |
$schema->storage->txn_rollback; |
| 254 |
- |
|
|