From 7bb3a0190474956f3ecd2be526203a16f5e84298 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 25 Nov 2015 13:48:07 +0100 Subject: [PATCH] Bug 15252 - correct UT searchtype value is contain and not contains --- t/DataTables/Members.t | 2 +- t/db_dependent/Utils/Datatables_Members.t | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/t/DataTables/Members.t b/t/DataTables/Members.t index 942f93f..c9dcc7f 100644 --- a/t/DataTables/Members.t +++ b/t/DataTables/Members.t @@ -6,7 +6,7 @@ use_ok( "C4::Utils::DataTables::Members" ); my $patrons = C4::Utils::DataTables::Members::search({ searchmember => "Doe", searchfieldstype => 'standard', - searchtype => 'contains' + searchtype => 'contain' }); isnt( $patrons->{iTotalDisplayRecords}, undef, "The iTotalDisplayRecords key is defined"); diff --git a/t/db_dependent/Utils/Datatables_Members.t b/t/db_dependent/Utils/Datatables_Members.t index 57b42f7..9f8cda8 100644 --- a/t/db_dependent/Utils/Datatables_Members.t +++ b/t/db_dependent/Utils/Datatables_Members.t @@ -104,7 +104,7 @@ my %dt_params = ( my $search_results = C4::Utils::DataTables::Members::search({ searchmember => "John Doe", searchfieldstype => 'standard', - searchtype => 'contains', + searchtype => 'contain', branchcode => $branchcode, dt_params => \%dt_params }); @@ -120,7 +120,7 @@ ok( $search_results->{ patrons }[0]->{ cardnumber } eq $john_doe{ cardnumber } $search_results = C4::Utils::DataTables::Members::search({ searchmember => "Jane Doe", searchfieldstype => 'standard', - searchtype => 'contains', + searchtype => 'contain', branchcode => $branchcode, dt_params => \%dt_params }); @@ -136,7 +136,7 @@ is( $search_results->{ patrons }[0]->{ cardnumber }, $search_results = C4::Utils::DataTables::Members::search({ searchmember => "John", searchfieldstype => 'standard', - searchtype => 'contains', + searchtype => 'contain', branchcode => $branchcode, dt_params => \%dt_params }); @@ -156,7 +156,7 @@ is( $search_results->{ patrons }[1]->{ cardnumber }, $search_results = C4::Utils::DataTables::Members::search({ searchmember => "Doe", searchfieldstype => 'standard', - searchtype => 'contains', + searchtype => 'contain', branchcode => $branchcode, dt_params => \%dt_params }); @@ -176,7 +176,7 @@ is( $search_results->{ patrons }[1]->{ cardnumber }, $search_results = C4::Utils::DataTables::Members::search({ searchmember => "john.doe", searchfieldstype => 'standard', - searchtype => 'contains', + searchtype => 'contain', branchcode => $branchcode, dt_params => \%dt_params }); @@ -187,7 +187,7 @@ is( $search_results->{ iTotalDisplayRecords }, 1, $search_results = C4::Utils::DataTables::Members::search({ searchmember => "john.doe", searchfieldstype => 'userid', - searchtype => 'contains', + searchtype => 'contain', branchcode => $branchcode, dt_params => \%dt_params }); @@ -211,7 +211,7 @@ t::lib::Mocks::mock_preference('ExtendedPatronAttributes', 1); $search_results = C4::Utils::DataTables::Members::search({ searchmember => "common user", searchfieldstype => 'standard', - searchtype => 'contains', + searchtype => 'contain', branchcode => $branchcode, dt_params => \%dt_params }); @@ -222,7 +222,7 @@ t::lib::Mocks::mock_preference('ExtendedPatronAttributes', 0); $search_results = C4::Utils::DataTables::Members::search({ searchmember => "common user", searchfieldstype => 'standard', - searchtype => 'contains', + searchtype => 'contain', branchcode => $branchcode, dt_params => \%dt_params }); -- 2.1.4