The 'search' method in Koha::Objects uses the context in which it was called to return either an iterator (in scalar context) or a list of singular objects, in list context. This behaviour should be covered by tests.
Created attachment 82745 [details] [review] Bug 21912: Add tests for Koha::Objects->search This patch adds simple tests for the current behaviour. Specifically the return values in both scalar and list context. To test: - Apply this patch - Run: $ prove t/db_dependent/Koha/Objects.t => SUCCESS: Tests pass - Sign off :-D
Created attachment 82750 [details] [review] Bug 21912: Add tests for Koha::Objects->search This patch adds simple tests for the current behaviour. Specifically the return values in both scalar and list context. To test: - Apply this patch - Run: $ prove t/db_dependent/Koha/Objects.t => SUCCESS: Tests pass - Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Trivial patch to increase the test coverage.. straight to PQA
Created attachment 83514 [details] [review] Bug 21912: (QA follow-up) Do not delete existing patrons Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Awesome work all! Pushed to master for 19.05
Never a bad idea to increase test coverage... choosing to backport this 'tests only' patch. Pushed to 18.11.x for 18.11.02
Pushed to 18.05.x for 18.05.09
Pushed to 17.11.x for 17.11.15