Lines 394-399
subtest 'apply() tests' => sub {
Link Here
|
394 |
is( $messages[0]->payload->{success}, 1, "'success' key in payload" ); |
394 |
is( $messages[0]->payload->{success}, 1, "'success' key in payload" ); |
395 |
|
395 |
|
396 |
t::lib::Mocks::mock_preference( 'MarkLostItemsAsReturned', 'onpayment'); |
396 |
t::lib::Mocks::mock_preference( 'MarkLostItemsAsReturned', 'onpayment'); |
|
|
397 |
t::lib::Mocks::mock_userenv( { branchcode => $library->id } ); |
397 |
my $loser = $builder->build_object( { class => 'Koha::Patrons' } ); |
398 |
my $loser = $builder->build_object( { class => 'Koha::Patrons' } ); |
398 |
my $loser_account = $loser->account; |
399 |
my $loser_account = $loser->account; |
399 |
|
400 |
|
Lines 443-450
subtest 'apply() tests' => sub {
Link Here
|
443 |
|
444 |
|
444 |
is( $loser->checkouts->next, undef, "Item has been returned"); |
445 |
is( $loser->checkouts->next, undef, "Item has been returned"); |
445 |
|
446 |
|
446 |
|
|
|
447 |
|
448 |
$schema->storage->txn_rollback; |
447 |
$schema->storage->txn_rollback; |
449 |
}; |
448 |
}; |
450 |
|
449 |
|
451 |
- |
|
|