From 8c2788855a4489d9ad0ff28f81ad48c9d19da9cf Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 8 Apr 2020 11:28:31 +0200 Subject: [PATCH] Bug 25046: Add test Signed-off-by: Jonathan Druart Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit e370007f0e04945a82a1fa1af42bfc84ab8855b4) Signed-off-by: Lucas Gass --- t/db_dependent/Utils/Datatables_Members.t | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Utils/Datatables_Members.t b/t/db_dependent/Utils/Datatables_Members.t index 8b0f8ce091..8fbbfb80a3 100644 --- a/t/db_dependent/Utils/Datatables_Members.t +++ b/t/db_dependent/Utils/Datatables_Members.t @@ -17,7 +17,7 @@ use Modern::Perl; -use Test::More tests => 51; +use Test::More tests => 52; use C4::Context; use C4::Members; @@ -517,5 +517,15 @@ subtest 'Search with permissions' => sub { ); }; +subtest 'return values' => sub { + plan tests => 1; + my $search_results = C4::Utils::DataTables::Members::search({ + searchmember => "John Doe", + searchfieldstype => 'standard', + searchtype => 'contain', + }); + ok(exists $search_results->{patrons}->[0]->{othernames}, 'othernames should have been retrieved' ); +}; + # End $schema->storage->txn_rollback; -- 2.20.1