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

(-)a/t/DataTables/Members.t (-1 / +1 lines)
Lines 6-12 use_ok( "C4::Utils::DataTables::Members" ); Link Here
6
my $patrons = C4::Utils::DataTables::Members::search({
6
my $patrons = C4::Utils::DataTables::Members::search({
7
    searchmember => "Doe",
7
    searchmember => "Doe",
8
    searchfieldstype => 'standard',
8
    searchfieldstype => 'standard',
9
    searchtype => 'contains'
9
    searchtype => 'contain'
10
});
10
});
11
11
12
isnt( $patrons->{iTotalDisplayRecords}, undef, "The iTotalDisplayRecords key is defined");
12
isnt( $patrons->{iTotalDisplayRecords}, undef, "The iTotalDisplayRecords key is defined");
(-)a/t/db_dependent/Utils/Datatables_Members.t (-9 / +8 lines)
Lines 104-110 my %dt_params = ( Link Here
104
my $search_results = C4::Utils::DataTables::Members::search({
104
my $search_results = C4::Utils::DataTables::Members::search({
105
    searchmember     => "John Doe",
105
    searchmember     => "John Doe",
106
    searchfieldstype => 'standard',
106
    searchfieldstype => 'standard',
107
    searchtype       => 'contains',
107
    searchtype       => 'contain',
108
    branchcode       => $branchcode,
108
    branchcode       => $branchcode,
109
    dt_params        => \%dt_params
109
    dt_params        => \%dt_params
110
});
110
});
Lines 120-126 ok( $search_results->{ patrons }[0]->{ cardnumber } eq $john_doe{ cardnumber } Link Here
120
$search_results = C4::Utils::DataTables::Members::search({
120
$search_results = C4::Utils::DataTables::Members::search({
121
    searchmember     => "Jane Doe",
121
    searchmember     => "Jane Doe",
122
    searchfieldstype => 'standard',
122
    searchfieldstype => 'standard',
123
    searchtype       => 'contains',
123
    searchtype       => 'contain',
124
    branchcode       => $branchcode,
124
    branchcode       => $branchcode,
125
    dt_params        => \%dt_params
125
    dt_params        => \%dt_params
126
});
126
});
Lines 136-142 is( $search_results->{ patrons }[0]->{ cardnumber }, Link Here
136
$search_results = C4::Utils::DataTables::Members::search({
136
$search_results = C4::Utils::DataTables::Members::search({
137
    searchmember     => "John",
137
    searchmember     => "John",
138
    searchfieldstype => 'standard',
138
    searchfieldstype => 'standard',
139
    searchtype       => 'contains',
139
    searchtype       => 'contain',
140
    branchcode       => $branchcode,
140
    branchcode       => $branchcode,
141
    dt_params        => \%dt_params
141
    dt_params        => \%dt_params
142
});
142
});
Lines 156-162 is( $search_results->{ patrons }[1]->{ cardnumber }, Link Here
156
$search_results = C4::Utils::DataTables::Members::search({
156
$search_results = C4::Utils::DataTables::Members::search({
157
    searchmember     => "Doe",
157
    searchmember     => "Doe",
158
    searchfieldstype => 'standard',
158
    searchfieldstype => 'standard',
159
    searchtype       => 'contains',
159
    searchtype       => 'contain',
160
    branchcode       => $branchcode,
160
    branchcode       => $branchcode,
161
    dt_params        => \%dt_params
161
    dt_params        => \%dt_params
162
});
162
});
Lines 176-182 is( $search_results->{ patrons }[1]->{ cardnumber }, Link Here
176
$search_results = C4::Utils::DataTables::Members::search({
176
$search_results = C4::Utils::DataTables::Members::search({
177
    searchmember     => "john.doe",
177
    searchmember     => "john.doe",
178
    searchfieldstype => 'standard',
178
    searchfieldstype => 'standard',
179
    searchtype       => 'contains',
179
    searchtype       => 'contain',
180
    branchcode       => $branchcode,
180
    branchcode       => $branchcode,
181
    dt_params        => \%dt_params
181
    dt_params        => \%dt_params
182
});
182
});
Lines 187-193 is( $search_results->{ iTotalDisplayRecords }, 1, Link Here
187
$search_results = C4::Utils::DataTables::Members::search({
187
$search_results = C4::Utils::DataTables::Members::search({
188
    searchmember     => "john.doe",
188
    searchmember     => "john.doe",
189
    searchfieldstype => 'userid',
189
    searchfieldstype => 'userid',
190
    searchtype       => 'contains',
190
    searchtype       => 'contain',
191
    branchcode       => $branchcode,
191
    branchcode       => $branchcode,
192
    dt_params        => \%dt_params
192
    dt_params        => \%dt_params
193
});
193
});
Lines 211-217 t::lib::Mocks::mock_preference('ExtendedPatronAttributes', 1); Link Here
211
$search_results = C4::Utils::DataTables::Members::search({
211
$search_results = C4::Utils::DataTables::Members::search({
212
    searchmember     => "common user",
212
    searchmember     => "common user",
213
    searchfieldstype => 'standard',
213
    searchfieldstype => 'standard',
214
    searchtype       => 'contains',
214
    searchtype       => 'contain',
215
    branchcode       => $branchcode,
215
    branchcode       => $branchcode,
216
    dt_params        => \%dt_params
216
    dt_params        => \%dt_params
217
});
217
});
Lines 222-228 t::lib::Mocks::mock_preference('ExtendedPatronAttributes', 0); Link Here
222
$search_results = C4::Utils::DataTables::Members::search({
222
$search_results = C4::Utils::DataTables::Members::search({
223
    searchmember     => "common user",
223
    searchmember     => "common user",
224
    searchfieldstype => 'standard',
224
    searchfieldstype => 'standard',
225
    searchtype       => 'contains',
225
    searchtype       => 'contain',
226
    branchcode       => $branchcode,
226
    branchcode       => $branchcode,
227
    dt_params        => \%dt_params
227
    dt_params        => \%dt_params
228
});
228
});
229
- 

Return to bug 15252