Bug 12265: [QA Follow-up] Replace DBIx search by find
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 14 Jul 2014 09:57:53 +0000 (11:57 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 14 Jul 2014 12:10:13 +0000 (09:10 -0300)
commit0bd14c7e8e1eb56887dcbc687357dabdf2dae2d5
tree45e7138c89d1a493e42191ed28c64aefaedf0d7a
parentafb6d14f253e4bd1828464e0147169597d9c7643
Bug 12265: [QA Follow-up] Replace DBIx search by find

This patch replaces DBIx search by find at two places in z3950servers.pl.
Furthermore, it adds testing on the results of the find method, passing
a not-found-message to the template whenever needed.
The function ServerSearch is adjusted to use HashRefInflator instead of
manually mapping the columns of result objects.
An additional defined-test in _form_data_hashref prevents shifting of
names and values in the result hash.

Test plan:
List all servers. Edit, copy and delete a server.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
admin/z3950servers.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/z3950servers.tt