View | Details | Raw Unified | Return to bug 13189
Collapse All | Expand All

(-)a/t/db_dependent/Members.t (-2 / +13 lines)
Lines 17-26 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 72;
20
use Test::More tests => 74;
21
use Test::MockModule;
21
use Test::MockModule;
22
use Data::Dumper;
22
use Data::Dumper;
23
use C4::Context;
23
use C4::Context;
24
use C4::Members::Attributes qw( SetBorrowerAttributes );
25
use C4::Members::AttributeTypes;
24
26
25
BEGIN {
27
BEGIN {
26
        use_ok('C4::Members');
28
        use_ok('C4::Members');
Lines 183-188 $results = Search(\@searchstring); Link Here
183
ok (_find_member($results), "Search (arrayref) for independent branches, same branch")
185
ok (_find_member($results), "Search (arrayref) for independent branches, same branch")
184
  or diag("Card $CARDNUMBER not found in the resultset for independent branches: ".Dumper(C4::Context->preference($INDEPENDENT_BRANCHES_PREF), $results));
186
  or diag("Card $CARDNUMBER not found in the resultset for independent branches: ".Dumper(C4::Context->preference($INDEPENDENT_BRANCHES_PREF), $results));
185
187
188
C4::Context->set_preference('ExtendedPatronAttributes', 1);
189
my $attr_type = C4::Members::AttributeTypes->new("TEST", "Test Description");
190
$attr_type->staff_searchable(1);
191
$attr_type->store();
192
SetBorrowerAttributes($addmem, [ { code => 'TEST', value => 'XYZZYX' } ] );
193
$results = Search( "XYZZYX", undef, undef, undef, undef, undef, 1 );
194
is( @$results, 0, "Search without extended attributes returns no results" );
195
$results = Search( "XYZZYX", undef, undef, undef, undef, undef, 0 );
196
is( @$results, 1, "Search with extended attributes returns results" );
197
186
C4::Context->set_preference( 'CardnumberLength', '' );
198
C4::Context->set_preference( 'CardnumberLength', '' );
187
C4::Context->clear_syspref_cache();
199
C4::Context->clear_syspref_cache();
188
200
189
- 

Return to bug 13189