Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 45; |
20 |
use Test::More tests => 46; |
21 |
use DateTime::Duration; |
21 |
use DateTime::Duration; |
22 |
|
22 |
|
23 |
use t::lib::Mocks; |
23 |
use t::lib::Mocks; |
Lines 443-448
t::lib::Mocks::mock_preference( 'UpdateItemLocationOnCheckin', '_ALL_: CART' );
Link Here
|
443 |
AddReturn( 'barcode_4', $branchcode_1 ); |
443 |
AddReturn( 'barcode_4', $branchcode_1 ); |
444 |
$item2 = Koha::Items->find( $itemnumber2 ); |
444 |
$item2 = Koha::Items->find( $itemnumber2 ); |
445 |
ok( $item2->location eq 'CART', q{UpdateItemLocationOnCheckin updates location value from 'GEN' with setting "_ALL_: CART"} ); |
445 |
ok( $item2->location eq 'CART', q{UpdateItemLocationOnCheckin updates location value from 'GEN' with setting "_ALL_: CART"} ); |
|
|
446 |
Koha::Item::Transfer->new({ |
447 |
itemnumber => $itemnumber2, |
448 |
frombranch => $branchcode_2, |
449 |
tobranch => $branchcode_1, |
450 |
datesent => '2020-01-01' |
451 |
})->store; |
452 |
AddReturn( 'barcode_4', $branchcode_1 ); |
453 |
$item2 = Koha::Items->find( $itemnumber2 ); |
454 |
ok( $item2->location eq 'CART', q{UpdateItemLocationOnCheckin updates location value from 'GEN' with setting "_ALL_: CART" when transfer filled} ); |
455 |
|
446 |
ok( $item2->permanent_location eq 'GEN', q{UpdateItemLocationOnCheckin does not update permanent_location value from 'GEN' with setting "_ALL_: CART"} ); |
456 |
ok( $item2->permanent_location eq 'GEN', q{UpdateItemLocationOnCheckin does not update permanent_location value from 'GEN' with setting "_ALL_: CART"} ); |
447 |
AddIssue( $borrower_1, 'barcode_4', $daysago10,0, $today, '' ); |
457 |
AddIssue( $borrower_1, 'barcode_4', $daysago10,0, $today, '' ); |
448 |
$item2 = Koha::Items->find( $itemnumber2 ); |
458 |
$item2 = Koha::Items->find( $itemnumber2 ); |
449 |
- |
|
|