|
Lines 598-614
my $itemnumber4 = Koha::Item->new(
Link Here
|
| 598 |
)->store->itemnumber; |
598 |
)->store->itemnumber; |
| 599 |
|
599 |
|
| 600 |
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', q{} ); |
600 |
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', q{} ); |
| 601 |
AddIssue( $borrower_2, 'barcode_6', dt_from_string ); |
601 |
AddIssue( $patron_2, 'barcode_6', dt_from_string ); |
| 602 |
$item = Koha::Items->find( $itemnumber4 ); |
602 |
$item = Koha::Items->find( $itemnumber4 ); |
| 603 |
ok( $item->notforloan eq -1, 'UpdateNotForLoanStatusOnCheckout does not modify value when not enabled' ); |
603 |
ok( $item->notforloan eq -1, 'UpdateNotForLoanStatusOnCheckout does not modify value when not enabled' ); |
| 604 |
|
604 |
|
| 605 |
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', '-1: 0' ); |
605 |
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', '-1: 0' ); |
| 606 |
AddReturn( 'barcode_6', $branchcode_1 ); |
606 |
AddReturn( 'barcode_6', $branchcode_1 ); |
| 607 |
my $test = AddIssue( $borrower_2, 'barcode_6', dt_from_string ); |
607 |
my $test = AddIssue( $patron_2, 'barcode_6', dt_from_string ); |
| 608 |
$item = Koha::Items->find( $itemnumber4 ); |
608 |
$item = Koha::Items->find( $itemnumber4 ); |
| 609 |
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout updates notforloan value from -1 to 0 with setting "-1: 0"} ); |
609 |
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout updates notforloan value from -1 to 0 with setting "-1: 0"} ); |
| 610 |
|
610 |
|
| 611 |
AddIssue( $borrower_2, 'barcode_6', dt_from_string ); |
611 |
AddIssue( $patron_2, 'barcode_6', dt_from_string ); |
| 612 |
AddReturn( 'barcode_6', $branchcode_1 ); |
612 |
AddReturn( 'barcode_6', $branchcode_1 ); |
| 613 |
$item = Koha::Items->find( $itemnumber4 ); |
613 |
$item = Koha::Items->find( $itemnumber4 ); |
| 614 |
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout does not update notforloan value from 0 with setting "-1: 0"} ); |
614 |
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout does not update notforloan value from 0 with setting "-1: 0"} ); |
| 615 |
- |
|
|