Bugzilla – Attachment 34172 Details for
Bug 13189
Patron card creator patron search browse by last name broken by extended attributes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13189 [QA Followup] - Unit Tests
Bug-13189-QA-Followup---Unit-Tests.patch (text/plain), 1.70 KB, created by
Kyle M Hall (khall)
on 2014-12-08 13:33:19 UTC
(
hide
)
Description:
Bug 13189 [QA Followup] - Unit Tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-12-08 13:33:19 UTC
Size:
1.70 KB
patch
obsolete
>From a73f913dd6bdc933c48a073991f1c231913a2c41 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 8 Dec 2014 07:19:59 -0500 >Subject: [PATCH] Bug 13189 [QA Followup] - Unit Tests > >--- > t/db_dependent/Members.t | 14 +++++++++++++- > 1 files changed, 13 insertions(+), 1 deletions(-) > >diff --git a/t/db_dependent/Members.t b/t/db_dependent/Members.t >index 0161c7b..426a9ec 100755 >--- a/t/db_dependent/Members.t >+++ b/t/db_dependent/Members.t >@@ -17,10 +17,12 @@ > > use Modern::Perl; > >-use Test::More tests => 69; >+use Test::More tests => 71; > use Test::MockModule; > use Data::Dumper; > use C4::Context; >+use C4::Members::Attributes qw( SetBorrowerAttributes ); >+use C4::Members::AttributeTypes; > > BEGIN { > use_ok('C4::Members'); >@@ -183,6 +185,16 @@ $results = Search(\@searchstring); > ok (_find_member($results), "Search (arrayref) for independent branches, same branch") > or diag("Card $CARDNUMBER not found in the resultset for independent branches: ".Dumper(C4::Context->preference($INDEPENDENT_BRANCHES_PREF), $results)); > >+C4::Context->set_preference('ExtendedPatronAttributes', 1); >+my $attr_type = C4::Members::AttributeTypes->new("TEST", "Test Description"); >+$attr_type->staff_searchable(1); >+$attr_type->store(); >+SetBorrowerAttributes($addmem, [ { code => 'TEST', value => 'XYZZYX' } ] ); >+$results = Search( "XYZZYX", undef, undef, undef, undef, undef, 1 ); >+is( @$results, 0, "Search without extended attributes returns no results" ); >+$results = Search( "XYZZYX", undef, undef, undef, undef, undef, 0 ); >+is( @$results, 1, "Search with extended attributes returns results" ); >+ > C4::Context->set_preference( 'CardnumberLength', '' ); > C4::Context->clear_syspref_cache(); > >-- >1.7.2.5
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 13189
:
33194
|
33433
|
33451
|
34171
|
34172
|
37741
|
37747