|
Lines 187-201
subtest 'pickup_locations' => sub {
Link Here
|
| 187 |
Koha::Patrons->search->delete; |
187 |
Koha::Patrons->search->delete; |
| 188 |
Koha::Items->search->delete; |
188 |
Koha::Items->search->delete; |
| 189 |
Koha::Libraries->search->delete; |
189 |
Koha::Libraries->search->delete; |
|
|
190 |
Koha::CirculationRules->search->delete; |
| 190 |
$dbh->do('DELETE FROM issues'); |
191 |
$dbh->do('DELETE FROM issues'); |
| 191 |
$dbh->do('DELETE FROM issuingrules'); |
192 |
Koha::CirculationRules->set_rules( |
| 192 |
$dbh->do( |
193 |
{ |
| 193 |
q{INSERT INTO issuingrules (categorycode, branchcode, itemtype, reservesallowed) |
194 |
categorycode => undef, |
| 194 |
VALUES (?, ?, ?, ?)}, |
195 |
itemtype => undef, |
| 195 |
{}, |
196 |
branchcode => undef, |
| 196 |
'*', '*', '*', 25 |
197 |
rules => { |
|
|
198 |
reservesallowed => 25, |
| 199 |
} |
| 200 |
} |
| 197 |
); |
201 |
); |
| 198 |
$dbh->do('DELETE FROM circulation_rules'); |
|
|
| 199 |
|
202 |
|
| 200 |
my $root1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } ); |
203 |
my $root1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } ); |
| 201 |
my $root2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } ); |
204 |
my $root2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } ); |
|
Lines 214-220
subtest 'pickup_locations' => sub {
Link Here
|
| 214 |
{ |
217 |
{ |
| 215 |
branchcode => $library1->branchcode, |
218 |
branchcode => $library1->branchcode, |
| 216 |
itemtype => undef, |
219 |
itemtype => undef, |
| 217 |
categorycode => undef, |
|
|
| 218 |
rules => { |
220 |
rules => { |
| 219 |
holdallowed => 1, |
221 |
holdallowed => 1, |
| 220 |
hold_fulfillment_policy => 'any', |
222 |
hold_fulfillment_policy => 'any', |
|
Lines 227-233
subtest 'pickup_locations' => sub {
Link Here
|
| 227 |
{ |
229 |
{ |
| 228 |
branchcode => $library2->branchcode, |
230 |
branchcode => $library2->branchcode, |
| 229 |
itemtype => undef, |
231 |
itemtype => undef, |
| 230 |
categorycode => undef, |
|
|
| 231 |
rules => { |
232 |
rules => { |
| 232 |
holdallowed => 3, |
233 |
holdallowed => 3, |
| 233 |
hold_fulfillment_policy => 'holdgroup', |
234 |
hold_fulfillment_policy => 'holdgroup', |
|
Lines 240-246
subtest 'pickup_locations' => sub {
Link Here
|
| 240 |
{ |
241 |
{ |
| 241 |
branchcode => $library3->branchcode, |
242 |
branchcode => $library3->branchcode, |
| 242 |
itemtype => undef, |
243 |
itemtype => undef, |
| 243 |
categorycode => undef, |
|
|
| 244 |
rules => { |
244 |
rules => { |
| 245 |
holdallowed => 3, |
245 |
holdallowed => 3, |
| 246 |
hold_fulfillment_policy => 'patrongroup', |
246 |
hold_fulfillment_policy => 'patrongroup', |
|
Lines 253-259
subtest 'pickup_locations' => sub {
Link Here
|
| 253 |
{ |
253 |
{ |
| 254 |
branchcode => $library4->branchcode, |
254 |
branchcode => $library4->branchcode, |
| 255 |
itemtype => undef, |
255 |
itemtype => undef, |
| 256 |
categorycode => undef, |
|
|
| 257 |
rules => { |
256 |
rules => { |
| 258 |
holdallowed => 2, |
257 |
holdallowed => 2, |
| 259 |
hold_fulfillment_policy => 'holdingbranch', |
258 |
hold_fulfillment_policy => 'holdingbranch', |
|
Lines 266-272
subtest 'pickup_locations' => sub {
Link Here
|
| 266 |
{ |
265 |
{ |
| 267 |
branchcode => $library5->branchcode, |
266 |
branchcode => $library5->branchcode, |
| 268 |
itemtype => undef, |
267 |
itemtype => undef, |
| 269 |
categorycode => undef, |
|
|
| 270 |
rules => { |
268 |
rules => { |
| 271 |
holdallowed => 2, |
269 |
holdallowed => 2, |
| 272 |
hold_fulfillment_policy => 'homebranch', |
270 |
hold_fulfillment_policy => 'homebranch', |
|
Lines 279-285
subtest 'pickup_locations' => sub {
Link Here
|
| 279 |
{ |
277 |
{ |
| 280 |
branchcode => $library6->branchcode, |
278 |
branchcode => $library6->branchcode, |
| 281 |
itemtype => undef, |
279 |
itemtype => undef, |
| 282 |
categorycode => undef, |
|
|
| 283 |
rules => { |
280 |
rules => { |
| 284 |
holdallowed => 1, |
281 |
holdallowed => 1, |
| 285 |
hold_fulfillment_policy => 'holdgroup', |
282 |
hold_fulfillment_policy => 'holdgroup', |
|
Lines 292-298
subtest 'pickup_locations' => sub {
Link Here
|
| 292 |
{ |
289 |
{ |
| 293 |
branchcode => $library7->branchcode, |
290 |
branchcode => $library7->branchcode, |
| 294 |
itemtype => undef, |
291 |
itemtype => undef, |
| 295 |
categorycode => undef, |
|
|
| 296 |
rules => { |
292 |
rules => { |
| 297 |
holdallowed => 3, |
293 |
holdallowed => 3, |
| 298 |
hold_fulfillment_policy => 'holdingbranch', |
294 |
hold_fulfillment_policy => 'holdingbranch', |
|
Lines 306-312
subtest 'pickup_locations' => sub {
Link Here
|
| 306 |
{ |
302 |
{ |
| 307 |
branchcode => $library8->branchcode, |
303 |
branchcode => $library8->branchcode, |
| 308 |
itemtype => undef, |
304 |
itemtype => undef, |
| 309 |
categorycode => undef, |
|
|
| 310 |
rules => { |
305 |
rules => { |
| 311 |
holdallowed => 2, |
306 |
holdallowed => 2, |
| 312 |
hold_fulfillment_policy => 'patrongroup', |
307 |
hold_fulfillment_policy => 'patrongroup', |