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