Lines 7-13
use t::lib::TestBuilder;
Link Here
|
7 |
|
7 |
|
8 |
use C4::Context; |
8 |
use C4::Context; |
9 |
|
9 |
|
10 |
use Test::More tests => 72; |
10 |
use Test::More tests => 73; |
11 |
use Test::Exception; |
11 |
use Test::Exception; |
12 |
|
12 |
|
13 |
use MARC::Record; |
13 |
use MARC::Record; |
Lines 2117-2123
subtest 'ModReserve to convert a hold to a recall' => sub {
Link Here
|
2117 |
my $category = $builder->build( { source => 'Category' } ); |
2117 |
my $category = $builder->build( { source => 'Category' } ); |
2118 |
my $branch = $builder->build( { source => 'Branch' } )->{branchcode}; |
2118 |
my $branch = $builder->build( { source => 'Branch' } )->{branchcode}; |
2119 |
my $biblio = $builder->build_sample_biblio( { itemtype => 'DUMMY' } ); |
2119 |
my $biblio = $builder->build_sample_biblio( { itemtype => 'DUMMY' } ); |
2120 |
my $item = $builder->build_sample_item( { library => $branch, biblionumber => $biblio->biblionumber } ); |
2120 |
my $itype = $builder->build( { source => 'Itemtype' } ); |
|
|
2121 |
my $item = |
2122 |
$builder->build_sample_item( |
2123 |
{ library => $branch, biblionumber => $biblio->biblionumber, itype => $itype->{itemtype} } ); |
2121 |
|
2124 |
|
2122 |
my $patron = Koha::Patron->new( |
2125 |
my $patron = Koha::Patron->new( |
2123 |
{ |
2126 |
{ |
Lines 2143-2149
subtest 'ModReserve to convert a hold to a recall' => sub {
Link Here
|
2143 |
t::lib::Mocks::mock_preference( "UseRecalls", 1 ); |
2146 |
t::lib::Mocks::mock_preference( "UseRecalls", 1 ); |
2144 |
t::lib::Mocks::mock_userenv( { branchcode => $branch } ); |
2147 |
t::lib::Mocks::mock_userenv( { branchcode => $branch } ); |
2145 |
|
2148 |
|
2146 |
C4::Circulation::AddIssue( $patron2->unblessed, $item->barcode ); |
2149 |
C4::Circulation::AddIssue( $patron2, $item->barcode ); |
2147 |
|
2150 |
|
2148 |
Koha::CirculationRules->set_rules( |
2151 |
Koha::CirculationRules->set_rules( |
2149 |
{ |
2152 |
{ |
2150 |
- |
|
|