Lines 367-373
subtest 'fill() tests' => sub {
Link Here
|
367 |
|
367 |
|
368 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 1 ); |
368 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 1 ); |
369 |
|
369 |
|
370 |
diag("Filling a hold when pref enabled should trigger a test"); |
370 |
# Filling a hold when pref enabled should trigger a test |
371 |
$builder->build_object( |
371 |
$builder->build_object( |
372 |
{ |
372 |
{ |
373 |
class => 'Koha::Holds', |
373 |
class => 'Koha::Holds', |
Lines 379-385
subtest 'fill() tests' => sub {
Link Here
|
379 |
|
379 |
|
380 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 0 ); |
380 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 0 ); |
381 |
|
381 |
|
382 |
diag("Filling a hold when pref disabled should not trigger a test"); |
382 |
# Filling a hold when pref disabled should not trigger a test |
383 |
$builder->build_object( |
383 |
$builder->build_object( |
384 |
{ |
384 |
{ |
385 |
class => 'Koha::Holds', |
385 |
class => 'Koha::Holds', |
Lines 411-426
subtest 'fill() tests' => sub {
Link Here
|
411 |
)->store; |
411 |
)->store; |
412 |
|
412 |
|
413 |
# Pref is off, no test triggered |
413 |
# Pref is off, no test triggered |
414 |
diag("Updating a hold location when pref disabled should not trigger a test"); |
414 |
# Updating a hold location when pref disabled should not trigger a test |
415 |
$hold->branchcode( $library_2->branchcode )->store; |
415 |
$hold->branchcode( $library_2->branchcode )->store; |
416 |
|
416 |
|
417 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 1 ); |
417 |
t::lib::Mocks::mock_preference( 'RealTimeHoldsQueue', 1 ); |
418 |
diag("Updating a hold location when pref enabled should trigger a test"); |
418 |
|
|
|
419 |
# Updating a hold location when pref enabled should trigger a test |
419 |
|
420 |
|
420 |
# Pref is on, test triggered |
421 |
# Pref is on, test triggered |
421 |
$hold->branchcode( $library_1->branchcode )->store; |
422 |
$hold->branchcode( $library_1->branchcode )->store; |
422 |
|
423 |
|
423 |
diag("Update with no change to pickup location should not trigger a test"); |
424 |
# Update with no change to pickup location should not trigger a test |
424 |
$hold->branchcode( $library_1->branchcode )->store; |
425 |
$hold->branchcode( $library_1->branchcode )->store; |
425 |
|
426 |
|
426 |
}; |
427 |
}; |
427 |
- |
|
|