Bug 19410: Move build_query_params_from_api into a helper
commitf1163dba9d70bfd463c0abe2f70528c66d12d7e7
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 21 Nov 2017 19:12:08 +0000 (21 16:12 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 11 Dec 2017 20:46:59 +0000 (11 17:46 -0300)
treee1b917942b1630d5f93bd428b4e665a8a6c386ac
parent86706c3b349e77bd2e67ced763dabec3b74c5b72
Bug 19410: Move build_query_params_from_api into a helper

This patch creates the 'build_query_params' helper, instead of the
original function in Koha::Objects.

Unit tests are removed for Koha::Objects::_build_query_params_from_api and
written for the helper plugin.

The objects.search helper gets a call to build_query_params added. Tests for it
updated to match this behaviour change.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/Koha/REST/Plugin/Query.t \
          t/db_dependent/Koha/Objects.t \
          t/db_dependent/Koha/REST/Plugin/Objects.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Lari Taskula <lari.taskula@jns.fi>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Objects.pm
Koha/REST/Plugin/Objects.pm
Koha/REST/Plugin/Query.pm
t/Koha/REST/Plugin/Query.t
t/db_dependent/Koha/Objects.t
t/db_dependent/Koha/REST/Plugin/Objects.t