Bug 16637: Dependency for C4::Tags not listed
authorMark Tompsett <mtompset@hotmail.com>
Sat, 4 Jun 2016 15:11:00 +0000 (11:11 -0400)
committerFrédéric Demians <f.demians@tamil.fr>
Wed, 15 Jun 2016 07:09:11 +0000 (09:09 +0200)
commit358e7a6d61d49c3ad8b57e2ad952f3fd9e4b83de
tree0f78f1f390f50756f85cb892151680bbb40fa6fc
parentfcbb59f25e25d86cc5be82595d330aa1b534b3cc
Bug 16637: Dependency for C4::Tags not listed

Added optional dependency, so as to explain why testing
explodes when the Enhanced Content system preference
TagsExternalDictionary is set. It is optional, because not only
does TagsExternalDictionary have to be set, but TagsEnabled
must be 'Allow'.

Also tweaked C4/Tags.pm to ignore TagsExternalDictionary,
if Lingua::Ispell is not installed. A warning is given.

TEST PLAN
---------
 1) Set the Enhanced Content system preference
    TagsExternalDictionary to /usr/bin/ispell

 2) sudo apt-get install liblingua-ispell-perl
    -- should be a new install

 3) prove t/db_dependent/Tags.t
    -- should work fine

 4) sudo apt-get remove liblingua-ispell-perl

 5) prove t/db_dependent/Tags.t
    -- should explode

 6) Clear the Enhanced Content system preference
    TagsExternalDictionary

 7) prove t/db_dependent/Tags.t
    -- should work fine

 8) apply patch

 9) prove t/db_dependent/Tags.t
    -- should work fine

10) Set the Enhanced Content system preference
    TagsExternalDictionary to /usr/bin/ispell

11) prove t/db_dependent/Tags.t
    -- should work, with warning.

12) sudo apt-get install liblingua-ispell-perl

13) prove t/db_dependent/Tags.t
    -- should work fine

14) run koha qa test tools.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Post-hackfest hotel Olympia lobby signoff. Kalimera!
Works as expected.
At this moment the Tags.t test does not need the database btw,
but the module should have much more test coverage.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c91b16bd9e82588c7625f69e37d6435dd378915e)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
C4/Installer/PerlDependencies.pm
C4/Tags.pm