|
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 => 74; |
10 |
use Test::More tests => 75; |
| 11 |
use Test::NoWarnings; |
11 |
use Test::NoWarnings; |
| 12 |
use Test::Exception; |
12 |
use Test::Exception; |
| 13 |
|
13 |
|
|
Lines 2154-2160
subtest 'ModReserve to convert a hold to a recall' => sub {
Link Here
|
| 2154 |
my $category = $builder->build( { source => 'Category' } ); |
2154 |
my $category = $builder->build( { source => 'Category' } ); |
| 2155 |
my $branch = $builder->build( { source => 'Branch' } )->{branchcode}; |
2155 |
my $branch = $builder->build( { source => 'Branch' } )->{branchcode}; |
| 2156 |
my $biblio = $builder->build_sample_biblio( { itemtype => 'DUMMY' } ); |
2156 |
my $biblio = $builder->build_sample_biblio( { itemtype => 'DUMMY' } ); |
| 2157 |
my $item = $builder->build_sample_item( { library => $branch, biblionumber => $biblio->biblionumber } ); |
2157 |
my $itype = $builder->build( { source => 'Itemtype' } ); |
|
|
2158 |
my $item = |
| 2159 |
$builder->build_sample_item( |
| 2160 |
{ library => $branch, biblionumber => $biblio->biblionumber, itype => $itype->{itemtype} } ); |
| 2158 |
|
2161 |
|
| 2159 |
my $patron = Koha::Patron->new( |
2162 |
my $patron = Koha::Patron->new( |
| 2160 |
{ |
2163 |
{ |
|
Lines 2180-2186
subtest 'ModReserve to convert a hold to a recall' => sub {
Link Here
|
| 2180 |
t::lib::Mocks::mock_preference( "UseRecalls", 1 ); |
2183 |
t::lib::Mocks::mock_preference( "UseRecalls", 1 ); |
| 2181 |
t::lib::Mocks::mock_userenv( { branchcode => $branch } ); |
2184 |
t::lib::Mocks::mock_userenv( { branchcode => $branch } ); |
| 2182 |
|
2185 |
|
| 2183 |
C4::Circulation::AddIssue( $patron2->unblessed, $item->barcode ); |
2186 |
C4::Circulation::AddIssue( $patron2, $item->barcode ); |
| 2184 |
|
2187 |
|
| 2185 |
Koha::CirculationRules->set_rules( |
2188 |
Koha::CirculationRules->set_rules( |
| 2186 |
{ |
2189 |
{ |
| 2187 |
- |
|
|