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

(-)a/t/db_dependent/Circulation/issue.t (-5 / +24 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 66;
20
use Test::More tests => 67;
21
use DateTime::Duration;
21
use DateTime::Duration;
22
22
23
use t::lib::Mocks;
23
use t::lib::Mocks;
Lines 462-472 AddReturn( 'barcode_3', $branchcode_1 ); Link Here
462
$item = Koha::Items->find( $itemnumber );
462
$item = Koha::Items->find( $itemnumber );
463
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckin _ALL_ rules are applied if there are no specific item type rule matching the returned item} );
463
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckin _ALL_ rules are applied if there are no specific item type rule matching the returned item} );
464
464
465
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckin', '1: ONLYMESSAGE' );
465
t::lib::Mocks::mock_preference(
466
    'UpdateNotForLoanStatusOnCheckin', q{_ALL_:
467
        1: ONLYMESSAGE
468
}
469
);
466
$item->notforloan(1)->store;
470
$item->notforloan(1)->store;
467
AddReturn( 'barcode_3', $branchcode_1 );
471
AddReturn( 'barcode_3', $branchcode_1 );
468
$item = Koha::Items->find( $itemnumber );
472
$item->discard_changes;
469
ok( $item->notforloan eq 1, q{UpdateNotForLoanStatusOnCheckin does not update notforloan value from 1 with setting "1: ONLYMESSAGE"} );
473
is(
474
    $item->notforloan, 1,
475
    q{UpdateNotForLoanStatusOnCheckin does not update notforloan value from 1 for _ALL_ with setting "1: ONLYMESSAGE"}
476
);
477
478
479
t::lib::Mocks::mock_preference(
480
    'UpdateNotForLoanStatusOnCheckin',  "$itemtype:\n
481
        1: ONLYMESSAGE
482
"
483
);
484
AddReturn( 'barcode_3', $branchcode_1 );
485
$item->discard_changes;
486
is(
487
    $item->notforloan, 1,
488
    q{UpdateNotForLoanStatusOnCheckin does not update notforloan value for specific itemtype from 1 with setting "1: ONLYMESSAGE"}
489
);
470
490
471
my $itemnumber2 = Koha::Item->new(
491
my $itemnumber2 = Koha::Item->new(
472
    {
492
    {
473
- 

Return to bug 35293