Bug 14769: Add tests for _thesaurus_info in ControlledIndicators.t
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tue, 6 Feb 2018 15:47:12 +0000 (16:47 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 12 Apr 2018 13:50:35 +0000 (10:50 -0300)
commiteae628e22d240df705a9b608a778fe6a1b21a586
tree59387e22c51bb246a7fa326cb566891852c795e9
parentb2a9c6d540b38039d17636adf9c00c0cd2b0f422
Bug 14769: Add tests for _thesaurus_info in ControlledIndicators.t

Apart from adding tests for this sub, we make the following change
too and support it with a test.

The fallback to $code in the construction
    $thes_mapping{ $code } // $code // '4'
is removed by this patch. When $code is not in $thes_mapping, we cannot
assume that it is a valid code for a biblio indicator. In this case it is
more safe to mark it as 4 (Source not specified).

Test plan:
Run t/Koha/Authority/ControlledIndicators.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Authority/ControlledIndicators.pm
t/Koha/Authority/ControlledIndicators.t