Bugzilla – Attachment 42498 Details for
Bug 14782
can't search by username anymore
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14782: Add tests
Bug-14782-Add-tests.patch (text/plain), 1.76 KB, created by
Katrin Fischer
on 2015-09-13 16:12:43 UTC
(
hide
)
Description:
Bug 14782: Add tests
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-09-13 16:12:43 UTC
Size:
1.76 KB
patch
obsolete
>From c71f554d4be52794faca857434b9840488df583c Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Sun, 13 Sep 2015 18:06:46 +0200 >Subject: [PATCH] Bug 14782: Add tests > >Run: >perl t/db_dependent/Utils/Datatables_Members.t >--- > t/db_dependent/Utils/Datatables_Members.t | 25 ++++++++++++++++++++++++- > 1 file changed, 24 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Utils/Datatables_Members.t b/t/db_dependent/Utils/Datatables_Members.t >index e0deaae..57b42f7 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 => 13; >+use Test::More tests => 15; > > use C4::Context; > use C4::Branch; >@@ -172,6 +172,29 @@ is( $search_results->{ patrons }[1]->{ cardnumber }, > $jane_doe{ cardnumber }, > "Jane Doe is the second result"); > >+# Search by userid >+$search_results = C4::Utils::DataTables::Members::search({ >+ searchmember => "john.doe", >+ searchfieldstype => 'standard', >+ searchtype => 'contains', >+ branchcode => $branchcode, >+ dt_params => \%dt_params >+}); >+ >+is( $search_results->{ iTotalDisplayRecords }, 1, >+ "John Doe is found by userid, standard search (Bug 14782)"); >+ >+$search_results = C4::Utils::DataTables::Members::search({ >+ searchmember => "john.doe", >+ searchfieldstype => 'userid', >+ searchtype => 'contains', >+ branchcode => $branchcode, >+ dt_params => \%dt_params >+}); >+ >+is( $search_results->{ iTotalDisplayRecords }, 1, >+ "John Doe is found by userid, userid search (Bug 14782)"); >+ > my $attribute_type = C4::Members::AttributeTypes->new( 'ATM_1', 'my attribute type' ); > $attribute_type->{staff_searchable} = 1; > $attribute_type->store; >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14782
:
42420
|
42454
| 42498 |
42499