Lines 255-271
subtest 'cancel' => sub {
Link Here
|
255 |
|
255 |
|
256 |
subtest 'cancel with reason' => sub { |
256 |
subtest 'cancel with reason' => sub { |
257 |
plan tests => 7; |
257 |
plan tests => 7; |
258 |
my $biblioitem = $builder->build_object( { class => 'Koha::Biblioitems' } ); |
|
|
259 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
258 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
260 |
my $itemtype = $builder->build_object( { class => 'Koha::ItemTypes', value => { rentalcharge => 0 } } ); |
259 |
my $item = $builder->build_sample_item({ library => $library->branchcode }); |
261 |
my $item_info = { |
|
|
262 |
biblionumber => $biblioitem->biblionumber, |
263 |
biblioitemnumber => $biblioitem->biblioitemnumber, |
264 |
homebranch => $library->branchcode, |
265 |
holdingbranch => $library->branchcode, |
266 |
itype => $itemtype->itemtype, |
267 |
}; |
268 |
my $item = $builder->build_object( { class => 'Koha::Items', value => $item_info } ); |
269 |
my $manager = $builder->build_object( { class => "Koha::Patrons" } ); |
260 |
my $manager = $builder->build_object( { class => "Koha::Patrons" } ); |
270 |
t::lib::Mocks::mock_userenv( { patron => $manager, branchcode => $manager->branchcode } ); |
261 |
t::lib::Mocks::mock_userenv( { patron => $manager, branchcode => $manager->branchcode } ); |
271 |
|
262 |
|
Lines 322-338
subtest 'cancel with reason' => sub {
Link Here
|
322 |
|
313 |
|
323 |
subtest 'cancel all with reason' => sub { |
314 |
subtest 'cancel all with reason' => sub { |
324 |
plan tests => 7; |
315 |
plan tests => 7; |
325 |
my $biblioitem = $builder->build_object( { class => 'Koha::Biblioitems' } ); |
|
|
326 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
316 |
my $library = $builder->build_object( { class => 'Koha::Libraries' } ); |
327 |
my $itemtype = $builder->build_object( { class => 'Koha::ItemTypes', value => { rentalcharge => 0 } } ); |
317 |
my $item = $builder->build_sample_item({ library => $library->branchcode }); |
328 |
my $item_info = { |
|
|
329 |
biblionumber => $biblioitem->biblionumber, |
330 |
biblioitemnumber => $biblioitem->biblioitemnumber, |
331 |
homebranch => $library->branchcode, |
332 |
holdingbranch => $library->branchcode, |
333 |
itype => $itemtype->itemtype, |
334 |
}; |
335 |
my $item = $builder->build_object( { class => 'Koha::Items', value => $item_info } ); |
336 |
my $manager = $builder->build_object( { class => "Koha::Patrons" } ); |
318 |
my $manager = $builder->build_object( { class => "Koha::Patrons" } ); |
337 |
t::lib::Mocks::mock_userenv( { patron => $manager, branchcode => $manager->branchcode } ); |
319 |
t::lib::Mocks::mock_userenv( { patron => $manager, branchcode => $manager->branchcode } ); |
338 |
|
320 |
|
339 |
- |
|
|