Lines 555-571
my $itemnumber4 = Koha::Item->new(
Link Here
|
555 |
)->store->itemnumber; |
555 |
)->store->itemnumber; |
556 |
|
556 |
|
557 |
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', q{} ); |
557 |
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', q{} ); |
558 |
AddIssue( $borrower_2, 'barcode_6', dt_from_string ); |
558 |
AddIssue( $patron_2, 'barcode_6', dt_from_string ); |
559 |
$item = Koha::Items->find( $itemnumber4 ); |
559 |
$item = Koha::Items->find( $itemnumber4 ); |
560 |
ok( $item->notforloan eq -1, 'UpdateNotForLoanStatusOnCheckout does not modify value when not enabled' ); |
560 |
ok( $item->notforloan eq -1, 'UpdateNotForLoanStatusOnCheckout does not modify value when not enabled' ); |
561 |
|
561 |
|
562 |
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', '-1: 0' ); |
562 |
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', '-1: 0' ); |
563 |
AddReturn( 'barcode_6', $branchcode_1 ); |
563 |
AddReturn( 'barcode_6', $branchcode_1 ); |
564 |
my $test = AddIssue( $borrower_2, 'barcode_6', dt_from_string ); |
564 |
my $test = AddIssue( $patron_2, 'barcode_6', dt_from_string ); |
565 |
$item = Koha::Items->find( $itemnumber4 ); |
565 |
$item = Koha::Items->find( $itemnumber4 ); |
566 |
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout updates notforloan value from -1 to 0 with setting "-1: 0"} ); |
566 |
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout updates notforloan value from -1 to 0 with setting "-1: 0"} ); |
567 |
|
567 |
|
568 |
AddIssue( $borrower_2, 'barcode_6', dt_from_string ); |
568 |
AddIssue( $patron_2, 'barcode_6', dt_from_string ); |
569 |
AddReturn( 'barcode_6', $branchcode_1 ); |
569 |
AddReturn( 'barcode_6', $branchcode_1 ); |
570 |
$item = Koha::Items->find( $itemnumber4 ); |
570 |
$item = Koha::Items->find( $itemnumber4 ); |
571 |
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout does not update notforloan value from 0 with setting "-1: 0"} ); |
571 |
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout does not update notforloan value from 0 with setting "-1: 0"} ); |
572 |
- |
|
|