Bug 35579: Add unit test

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ca754a2c5e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 548c9ce885)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
David Cook 2023-12-18 00:11:32 +00:00 committed by Lucas Gass
parent 1c8291f8ae
commit b9d05a7e3f

View file

@ -144,7 +144,7 @@ is_deeply(
);
subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_values' => sub {
plan tests => 6;
plan tests => 7;
my $test_cat = Koha::AuthorisedValueCategories->find('TEST');
$test_cat->delete if $test_cat;
@ -252,6 +252,21 @@ subtest 'search_by_*_field + find_by_koha_field + get_description + authorised_v
],
);
};
subtest 'get_descriptions_by_marc_field' => sub {
plan tests => 1;
my $descriptions = Koha::AuthorisedValues->get_descriptions_by_marc_field(
{ frameworkcode => '', tagfield => '952', tagsubfield => 'c' } );
is_deeply(
$descriptions,
{
'location_1' => 'location_1',
'location_2' => 'location_2',
'location_3' => 'location_3',
},
);
};
subtest 'authorised_values' => sub {
plan tests => 2;