|
Lines 17-23
Link Here
|
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
|
19 |
|
| 20 |
use Test::More tests => 13; |
20 |
use Test::More tests => 15; |
| 21 |
|
21 |
|
| 22 |
use C4::Context; |
22 |
use C4::Context; |
| 23 |
use C4::Branch; |
23 |
use C4::Branch; |
|
Lines 172-177
is( $search_results->{ patrons }[1]->{ cardnumber },
Link Here
|
| 172 |
$jane_doe{ cardnumber }, |
172 |
$jane_doe{ cardnumber }, |
| 173 |
"Jane Doe is the second result"); |
173 |
"Jane Doe is the second result"); |
| 174 |
|
174 |
|
|
|
175 |
# Search by userid |
| 176 |
$search_results = C4::Utils::DataTables::Members::search({ |
| 177 |
searchmember => "john.doe", |
| 178 |
searchfieldstype => 'standard', |
| 179 |
searchtype => 'contains', |
| 180 |
branchcode => $branchcode, |
| 181 |
dt_params => \%dt_params |
| 182 |
}); |
| 183 |
|
| 184 |
is( $search_results->{ iTotalDisplayRecords }, 1, |
| 185 |
"John Doe is found by userid, standard search (Bug 14782)"); |
| 186 |
|
| 187 |
$search_results = C4::Utils::DataTables::Members::search({ |
| 188 |
searchmember => "john.doe", |
| 189 |
searchfieldstype => 'userid', |
| 190 |
searchtype => 'contains', |
| 191 |
branchcode => $branchcode, |
| 192 |
dt_params => \%dt_params |
| 193 |
}); |
| 194 |
|
| 195 |
is( $search_results->{ iTotalDisplayRecords }, 1, |
| 196 |
"John Doe is found by userid, userid search (Bug 14782)"); |
| 197 |
|
| 175 |
my $attribute_type = C4::Members::AttributeTypes->new( 'ATM_1', 'my attribute type' ); |
198 |
my $attribute_type = C4::Members::AttributeTypes->new( 'ATM_1', 'my attribute type' ); |
| 176 |
$attribute_type->{staff_searchable} = 1; |
199 |
$attribute_type->{staff_searchable} = 1; |
| 177 |
$attribute_type->store; |
200 |
$attribute_type->store; |
| 178 |
- |
|
|