Lines 17-23
Link Here
|
17 |
|
17 |
|
18 |
use Modern::Perl; |
18 |
use Modern::Perl; |
19 |
|
19 |
|
20 |
use Test::More tests => 4; |
20 |
use Test::More tests => 5; |
21 |
use Test::MockModule; |
21 |
use Test::MockModule; |
22 |
use Test::Warn; |
22 |
use Test::Warn; |
23 |
|
23 |
|
Lines 339-342
subtest 'BlockReturnOfLostItems' => sub {
Link Here
|
339 |
is( $doreturn, 1, "Without BlockReturnOfLostItems, a checkin of a lost item should not be blocked"); |
339 |
is( $doreturn, 1, "Without BlockReturnOfLostItems, a checkin of a lost item should not be blocked"); |
340 |
}; |
340 |
}; |
341 |
|
341 |
|
|
|
342 |
subtest 'Checkin of an item claimed as returned should generate a message' => sub { |
343 |
plan tests => 1; |
344 |
|
345 |
t::lib::Mocks::mock_preference('ClaimReturnedLostValue', 1); |
346 |
my $biblio = $builder->build_object( { class => 'Koha::Biblios' } ); |
347 |
my $item = $builder->build_object( |
348 |
{ |
349 |
class => 'Koha::Items', |
350 |
value => { |
351 |
biblionumber => $biblio->biblionumber, |
352 |
notforloan => 0, |
353 |
itemlost => 0, |
354 |
withdrawn => 0, |
355 |
} |
356 |
} |
357 |
); |
358 |
my $patron = $builder->build_object({class => 'Koha::Patrons'}); |
359 |
my $checkout = AddIssue( $patron->unblessed, $item->barcode ); |
360 |
|
361 |
$checkout->claim_returned({ created_by => $patron->id }); |
362 |
|
363 |
my ( $doreturn, $messages, $issue ) = AddReturn($item->barcode); |
364 |
ok( $messages->{ReturnClaims}, "ReturnClaims is in messages for return of a claimed as returned itm" ); |
365 |
}; |
366 |
|
342 |
$schema->storage->txn_rollback; |
367 |
$schema->storage->txn_rollback; |
343 |
- |
|
|