|
Lines 18-24
Link Here
|
| 18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
| 19 |
use utf8; |
19 |
use utf8; |
| 20 |
|
20 |
|
| 21 |
use Test::More tests => 60; |
21 |
use Test::More tests => 61; |
| 22 |
use Test::Exception; |
22 |
use Test::Exception; |
| 23 |
use Test::MockModule; |
23 |
use Test::MockModule; |
| 24 |
use Test::Deep qw( cmp_deeply ); |
24 |
use Test::Deep qw( cmp_deeply ); |
|
Lines 4250-4255
subtest 'AddReturn | recalls' => sub {
Link Here
|
| 4250 |
$recall1->set_cancelled; |
4250 |
$recall1->set_cancelled; |
| 4251 |
}; |
4251 |
}; |
| 4252 |
|
4252 |
|
|
|
4253 |
subtest 'AddReturn | bundles' => sub { |
| 4254 |
plan tests => 1; |
| 4255 |
|
| 4256 |
my $schema = Koha::Database->schema; |
| 4257 |
$schema->storage->txn_begin; |
| 4258 |
|
| 4259 |
my $patron1 = $builder->build_object({ class => 'Koha::Patrons' }); |
| 4260 |
my $host_item1 = $builder->build_sample_item; |
| 4261 |
my $bundle_item1 = $builder->build_sample_item; |
| 4262 |
$schema->resultset('ItemBundle') |
| 4263 |
->create( |
| 4264 |
{ host => $host_item1->itemnumber, item => $bundle_item1->itemnumber } ); |
| 4265 |
|
| 4266 |
my ( $doreturn, $messages, $iteminfo, $borrowerinfo ) = AddReturn( $bundle_item1->barcode, $bundle_item1->homebranch ); |
| 4267 |
is($messages->{InBundle}->id, $host_item1->id, 'AddReturn returns InBundle host item when item is part of a bundle'); |
| 4268 |
|
| 4269 |
$schema->storage->txn_rollback; |
| 4270 |
}; |
| 4271 |
|
| 4253 |
subtest 'AddRenewal and AddIssuingCharge tests' => sub { |
4272 |
subtest 'AddRenewal and AddIssuingCharge tests' => sub { |
| 4254 |
|
4273 |
|
| 4255 |
plan tests => 13; |
4274 |
plan tests => 13; |
| 4256 |
- |
|
|