Lines 377-388
my $itemnumber2;
Link Here
|
377 |
$biblionumber |
377 |
$biblionumber |
378 |
); |
378 |
); |
379 |
|
379 |
|
380 |
C4::Context->set_preference( 'UpdateItemLocationOnCheckin', q{} ); |
380 |
t::lib::Mocks::mock_preference( 'UpdateItemLocationOnCheckin', q{} ); |
381 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
381 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
382 |
my $item2 = GetItem( $itemnumber2 ); |
382 |
my $item2 = GetItem( $itemnumber2 ); |
383 |
ok( $item2->{location} eq 'FIC', 'UpdateItemLocationOnCheckin does not modify value when not enabled' ); |
383 |
ok( $item2->{location} eq 'FIC', 'UpdateItemLocationOnCheckin does not modify value when not enabled' ); |
384 |
|
384 |
|
385 |
C4::Context->set_preference( 'UpdateItemLocationOnCheckin', 'FIC: GEN' ); |
385 |
t::lib::Mocks::mock_preference( 'UpdateItemLocationOnCheckin', 'FIC: GEN' ); |
386 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
386 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
387 |
$item2 = GetItem( $itemnumber2 ); |
387 |
$item2 = GetItem( $itemnumber2 ); |
388 |
ok( $item2->{location} eq 'GEN', q{UpdateItemLocationOnCheckin updates location value from 'FIC' to 'GEN' with setting "FIC: GEN"} ); |
388 |
ok( $item2->{location} eq 'GEN', q{UpdateItemLocationOnCheckin updates location value from 'FIC' to 'GEN' with setting "FIC: GEN"} ); |
Lines 391-397
AddReturn( 'barcode_4', $samplebranch1->{branchcode} );
Link Here
|
391 |
$item2 = GetItem( $itemnumber2 ); |
391 |
$item2 = GetItem( $itemnumber2 ); |
392 |
ok( $item2->{location} eq 'GEN', q{UpdateItemLocationOnCheckin does not update location value from 'GEN' with setting "FIC: GEN"} ); |
392 |
ok( $item2->{location} eq 'GEN', q{UpdateItemLocationOnCheckin does not update location value from 'GEN' with setting "FIC: GEN"} ); |
393 |
|
393 |
|
394 |
C4::Context->set_preference( 'UpdateItemLocationOnCheckin', '_ALL_: CART' ); |
394 |
t::lib::Mocks::mock_preference( 'UpdateItemLocationOnCheckin', '_ALL_: CART' ); |
395 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
395 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
396 |
$item2 = GetItem( $itemnumber2 ); |
396 |
$item2 = GetItem( $itemnumber2 ); |
397 |
ok( $item2->{location} eq 'CART', q{UpdateItemLocationOnCheckin updates location value from 'GEN' with setting "_ALL_: CART"} ); |
397 |
ok( $item2->{location} eq 'CART', q{UpdateItemLocationOnCheckin updates location value from 'GEN' with setting "_ALL_: CART"} ); |
Lines 400-406
AddIssue( $borrower_1, 'barcode_4', $daysago10,0, $today, '' );
Link Here
|
400 |
$item2 = GetItem( $itemnumber2 ); |
400 |
$item2 = GetItem( $itemnumber2 ); |
401 |
ok( $item2->{location} eq 'GEN', q{Location updates from 'CART' to permanent location on issue} ); |
401 |
ok( $item2->{location} eq 'GEN', q{Location updates from 'CART' to permanent location on issue} ); |
402 |
|
402 |
|
403 |
C4::Context->set_preference( 'UpdateItemLocationOnCheckin', "GEN: _BLANK_\n_BLANK_: PROC\nPROC: _PERM_" ); |
403 |
t::lib::Mocks::mock_preference( 'UpdateItemLocationOnCheckin', "GEN: _BLANK_\n_BLANK_: PROC\nPROC: _PERM_" ); |
404 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
404 |
AddReturn( 'barcode_4', $samplebranch1->{branchcode} ); |
405 |
$item2 = GetItem( $itemnumber2 ); |
405 |
$item2 = GetItem( $itemnumber2 ); |
406 |
ok( $item2->{location} eq '', q{UpdateItemLocationOnCheckin updates location value from 'GEN' to '' with setting "GEN: _BLANK_"} ); |
406 |
ok( $item2->{location} eq '', q{UpdateItemLocationOnCheckin updates location value from 'GEN' to '' with setting "GEN: _BLANK_"} ); |
407 |
- |
|
|