@@ -, +, @@ --- t/db_dependent/Circulation/Returns.t | 3 +++ 1 file changed, 3 insertions(+) --- a/t/db_dependent/Circulation/Returns.t +++ a/t/db_dependent/Circulation/Returns.t @@ -302,6 +302,9 @@ subtest 'Handle ids duplication' => sub { $account_lines = Koha::Account::Lines->search({ borrowernumber => $patron->borrowernumber, issue_id => $new_checkout->{issue_id} }); is( $account_lines->count, 2, 'Two account lines should exist on new issue_id' ); + $account_lines = Koha::Account::Lines->search({ borrowernumber => $patron->borrowernumber }); + use Data::Printer colored => 1; warn p $account_lines->unblessed; + isnt( $original_checkout->issue_id, $new_checkout->{issue_id}, 'AddReturn should return the issue with the new issue_id' ); isnt( $old_checkout->itemnumber, $item->{itemnumber}, 'If an item is checked-in, it should be moved to old_issues even if the issue_id already existed in the table' ); }; --