Bug 18434: Add tests for K:SE:E::get_fixer_rules
This patch tries to introduce exhaustive tests for this class method.
I didn't try to provide a regression test for the current bug per-se, but
cover the current method behaviour as much as I could.
(kidclamp) I added a quick test of _convert_marc_to_json to use the mocking here
and illuminate what the change does, before the patches this should
fail (fields are indexed in place of one another), after it should succeed (new indexed fields are appended).
A minor bug is highlighted by this new tests, I'll provide a followup for it.
To test:
- Run:
$ sudo koha-shell kohadev
k$ de kohaclone
k$ prove t/db_dependent/Koha_Elasticsearch.t
=> FAIL: The returned fixer rules are not the expected ones
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit
2d19a34529bc313922a085a99288e55d8634c8b6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>