Bug 19049: [QA Follow-up] Mock config, default format
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 11 Aug 2017 06:34:45 +0000 (08:34 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 15 Aug 2017 15:17:42 +0000 (12:17 -0300)
commita423fcff42da05e9ebf9f2b4a2f192023346e93e
tree2a079d6bfd6a3b57f621e9d5c04bd01f6ea6b296
parentd8f6315b6d9b1c7145f6036b55b7927f6d6e6e48
Bug 19049: [QA Follow-up] Mock config, default format

As requested by QA:
[1] Mock_config enable_plugins in the test.
[2] Fallback to MARC when format is empty. Remove die statement.
Added:
[3] Remove $marc. This variable got obsolete during development.
[4] Add test on $input_file and $plugin_class. Test $text before calling
    Handler or processing $text. No need to split undef if somehow Handler
    returned undef, etc. If the routine returns an empty arrayref,
    stage-marc-import will do fine.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/ImportBatch.pm
t/db_dependent/ImportBatch.t
tools/stage-marc-import.pl