Bug 32496: Some fixes
This can be squashed Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
f726558510
commit
fa28d2a17c
|
|
@ -263,7 +263,7 @@ sub add {
|
|||
}
|
||||
|
||||
# Call 'AddIssue'
|
||||
my $checkout = AddIssue( $patron->unblessed, $item->barcode );
|
||||
my $checkout = AddIssue( $patron, $item->barcode );
|
||||
if ($checkout) {
|
||||
$c->res->headers->location(
|
||||
$c->req->url->to_string . '/' . $checkout->id );
|
||||
|
|
|
|||
|
|
@ -598,17 +598,17 @@ my $itemnumber4 = Koha::Item->new(
|
|||
)->store->itemnumber;
|
||||
|
||||
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', q{} );
|
||||
AddIssue( $borrower_2, 'barcode_6', dt_from_string );
|
||||
AddIssue( $patron_2, 'barcode_6', dt_from_string );
|
||||
$item = Koha::Items->find( $itemnumber4 );
|
||||
ok( $item->notforloan eq -1, 'UpdateNotForLoanStatusOnCheckout does not modify value when not enabled' );
|
||||
|
||||
t::lib::Mocks::mock_preference( 'UpdateNotForLoanStatusOnCheckout', '-1: 0' );
|
||||
AddReturn( 'barcode_6', $branchcode_1 );
|
||||
my $test = AddIssue( $borrower_2, 'barcode_6', dt_from_string );
|
||||
my $test = AddIssue( $patron_2, 'barcode_6', dt_from_string );
|
||||
$item = Koha::Items->find( $itemnumber4 );
|
||||
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout updates notforloan value from -1 to 0 with setting "-1: 0"} );
|
||||
|
||||
AddIssue( $borrower_2, 'barcode_6', dt_from_string );
|
||||
AddIssue( $patron_2, 'barcode_6', dt_from_string );
|
||||
AddReturn( 'barcode_6', $branchcode_1 );
|
||||
$item = Koha::Items->find( $itemnumber4 );
|
||||
ok( $item->notforloan eq 0, q{UpdateNotForLoanStatusOnCheckout does not update notforloan value from 0 with setting "-1: 0"} );
|
||||
|
|
|
|||
Loading…
Reference in New Issue