Lines 302-307
subtest 'Handle ids duplication' => sub {
Link Here
|
302 |
$account_lines = Koha::Account::Lines->search({ borrowernumber => $patron->borrowernumber, issue_id => $new_checkout->{issue_id} }); |
302 |
$account_lines = Koha::Account::Lines->search({ borrowernumber => $patron->borrowernumber, issue_id => $new_checkout->{issue_id} }); |
303 |
is( $account_lines->count, 2, 'Two account lines should exist on new issue_id' ); |
303 |
is( $account_lines->count, 2, 'Two account lines should exist on new issue_id' ); |
304 |
|
304 |
|
|
|
305 |
$account_lines = Koha::Account::Lines->search({ borrowernumber => $patron->borrowernumber }); |
306 |
use Data::Printer colored => 1; warn p $account_lines->unblessed; |
307 |
|
305 |
isnt( $original_checkout->issue_id, $new_checkout->{issue_id}, 'AddReturn should return the issue with the new issue_id' ); |
308 |
isnt( $original_checkout->issue_id, $new_checkout->{issue_id}, 'AddReturn should return the issue with the new issue_id' ); |
306 |
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' ); |
309 |
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' ); |
307 |
}; |
310 |
}; |
308 |
- |
|
|