Lines 174-180
subtest 'search_by_*_field + find_by_koha_field + get_description' => sub {
Link Here
|
174 |
is( $av, undef, ); |
174 |
is( $av, undef, ); |
175 |
}; |
175 |
}; |
176 |
subtest 'get_description_by_koha_field' => sub { |
176 |
subtest 'get_description_by_koha_field' => sub { |
177 |
plan tests => 3; |
177 |
plan tests => 4; |
178 |
my $descriptions; |
178 |
my $descriptions; |
179 |
|
179 |
|
180 |
# Test authorised_value = 0 |
180 |
# Test authorised_value = 0 |
Lines 199-204
subtest 'search_by_*_field + find_by_koha_field + get_description' => sub {
Link Here
|
199 |
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field( |
199 |
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field( |
200 |
{ kohafield => 'items.restricted', authorised_value => undef } ); |
200 |
{ kohafield => 'items.restricted', authorised_value => undef } ); |
201 |
is_deeply( $descriptions, {}, ) ; # This could be arguable, we could return undef instead |
201 |
is_deeply( $descriptions, {}, ) ; # This could be arguable, we could return undef instead |
|
|
202 |
|
203 |
# No authorised_value |
204 |
$descriptions = Koha::AuthorisedValues->get_description_by_koha_field( |
205 |
{ kohafield => 'items.restricted', authorised_value => "does not exist" } ); |
206 |
is_deeply( $descriptions, {}, ) ; # This could be arguable, we could return undef instead |
202 |
}; |
207 |
}; |
203 |
subtest 'get_descriptions_by_koha_field' => sub { |
208 |
subtest 'get_descriptions_by_koha_field' => sub { |
204 |
plan tests => 1; |
209 |
plan tests => 1; |
205 |
- |
|
|