Lines 412-423
subtest 'Holds test' => sub {
Link Here
|
412 |
$reply = C4::ILSDI::Services::HoldItem( $query ); |
412 |
$reply = C4::ILSDI::Services::HoldItem( $query ); |
413 |
is( $reply->{code}, 'damaged', "Item is damaged" ); |
413 |
is( $reply->{code}, 'damaged', "Item is damaged" ); |
414 |
|
414 |
|
415 |
my $module = new Test::MockModule('C4::Context'); |
415 |
my $module = Test::MockModule->new('C4::Context'); |
416 |
$module->mock('userenv', sub { { patron => $patron } }); |
416 |
$module->mock('userenv', sub { { patron => $patron } }); |
417 |
my $issue = C4::Circulation::AddIssue($patron, $item3->barcode); |
417 |
my $issue = C4::Circulation::AddIssue($patron, $item3->barcode); |
418 |
t::lib::Mocks::mock_preference( 'AllowHoldsOnPatronsPossessions', '0' ); |
418 |
t::lib::Mocks::mock_preference( 'AllowHoldsOnPatronsPossessions', '0' ); |
419 |
|
419 |
|
420 |
$query = new CGI; |
420 |
$query = CGI->new; |
421 |
$query->param( 'patron_id', $patron->{borrowernumber}); |
421 |
$query->param( 'patron_id', $patron->{borrowernumber}); |
422 |
$query->param( 'bib_id', $item3->biblionumber); |
422 |
$query->param( 'bib_id', $item3->biblionumber); |
423 |
$query->param( 'item_id', $item3->itemnumber); |
423 |
$query->param( 'item_id', $item3->itemnumber); |
424 |
- |
|
|