Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 47; |
20 |
use Test::More tests => 48; |
21 |
use DateTime::Duration; |
21 |
use DateTime::Duration; |
22 |
|
22 |
|
23 |
use t::lib::Mocks; |
23 |
use t::lib::Mocks; |
Lines 467-472
$item2 = Koha::Items->find( $itemnumber2 );
Link Here
|
467 |
ok( $item2->location eq '' , q{UpdateItemLocationOnCheckin updates location value from 'PROC' to '' with setting "PROC: _PERM_" } ); |
467 |
ok( $item2->location eq '' , q{UpdateItemLocationOnCheckin updates location value from 'PROC' to '' with setting "PROC: _PERM_" } ); |
468 |
ok( $item2->permanent_location eq '' , q{UpdateItemLocationOnCheckin does not update permanent_location from '' with setting "PROC: _PERM_" } ); |
468 |
ok( $item2->permanent_location eq '' , q{UpdateItemLocationOnCheckin does not update permanent_location from '' with setting "PROC: _PERM_" } ); |
469 |
|
469 |
|
|
|
470 |
# Bug 28472 |
471 |
my $itemnumber3 = Koha::Item->new( |
472 |
{ |
473 |
biblionumber => $biblionumber, |
474 |
barcode => 'barcode_5', |
475 |
itemcallnumber => 'callnumber5', |
476 |
homebranch => $branchcode_1, |
477 |
holdingbranch => $branchcode_1, |
478 |
location => undef, |
479 |
itype => $itemtype |
480 |
} |
481 |
)->store->itemnumber; |
482 |
|
483 |
t::lib::Mocks::mock_preference( 'UpdateItemLocationOnCheckin', '_ALL_: CART' ); |
484 |
AddReturn( 'barcode_5', $branchcode_1 ); |
485 |
my $item3 = Koha::Items->find( $itemnumber3 ); |
486 |
is( $item3->location, 'CART', q{UpdateItemLocationOnCheckin updates location value from NULL (i.e. the item has no shelving location set) to 'CART' with setting "_ALL_: CART"} ); |
470 |
|
487 |
|
471 |
|
488 |
|
472 |
|
489 |
|
473 |
- |
|
|