|
Lines 17-23
Link Here
|
| 17 |
|
17 |
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
|
19 |
|
| 20 |
use Test::More tests => 44; |
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 419-426
$item2 = GetItem( $itemnumber2 );
Link Here
|
| 419 |
ok( $item2->{location} eq '' , q{UpdateItemLocationOnCheckin updates location value from 'PROC' to '' with setting "PROC: _PERM_" } ); |
419 |
ok( $item2->{location} eq '' , q{UpdateItemLocationOnCheckin updates location value from 'PROC' to '' with setting "PROC: _PERM_" } ); |
| 420 |
ok( $item2->{permanent_location} eq '' , q{UpdateItemLocationOnCheckin does not update permanent_location from '' with setting "PROC: _PERM_" } ); |
420 |
ok( $item2->{permanent_location} eq '' , q{UpdateItemLocationOnCheckin does not update permanent_location from '' with setting "PROC: _PERM_" } ); |
| 421 |
|
421 |
|
|
|
422 |
my $itemnumber3; |
| 423 |
($biblionumber, $biblioitemnumber, $itemnumber3) = C4::Items::AddItem( |
| 424 |
{ |
| 425 |
barcode => 'barcode_5', |
| 426 |
itemcallnumber => 'callnumber5', |
| 427 |
homebranch => $branchcode_1, |
| 428 |
holdingbranch => $branchcode_1, |
| 429 |
location => 'CART', |
| 430 |
itype => $itemtype |
| 431 |
}, |
| 432 |
$biblionumber |
| 433 |
); |
| 422 |
|
434 |
|
|
|
435 |
#BlankItemLocationOnCheckout |
| 436 |
t::lib::Mocks::mock_preference('UpdateItemLocationOnCheckout', 0); |
| 437 |
AddIssue($borrower_1, 'barcode_5', $daysago10, 0 , $today, 0); |
| 438 |
my $item3 = GetItem($itemnumber3); |
| 439 |
ok($item3->{location} eq 'CART', q{UpdateItemLocationOnCheckout does not update item shelving location value from 'CART' to '' when not enabled} ); |
| 423 |
|
440 |
|
|
|
441 |
t::lib::Mocks::mock_preference('UpdateItemLocationOnCheckout', 1); |
| 442 |
AddIssue($borrower_1, 'barcode_5', $daysago10, 0, $today, ''); |
| 443 |
$item3 = GetItem($itemnumber3); |
| 444 |
ok($item3->{location} eq '', q{UpdateItemLocationOnCheckout updates item shelving location value from 'CART' to '' when enabled} ); |
| 424 |
|
445 |
|
| 425 |
# Bug 14640 - Cancel the hold on checking out if asked |
446 |
# Bug 14640 - Cancel the hold on checking out if asked |
| 426 |
my $reserve_id = AddReserve($branchcode_1, $borrower_id1, $biblionumber, |
447 |
my $reserve_id = AddReserve($branchcode_1, $borrower_id1, $biblionumber, |
| 427 |
- |
|
|