Lines 495-501
subtest 'checkout() tests' => sub {
Link Here
|
495 |
is( ref($old_line_checkout), 'Koha::Old::Checkout', 'Result type is correct' ); |
495 |
is( ref($old_line_checkout), 'Koha::Old::Checkout', 'Result type is correct' ); |
496 |
is( $old_line_checkout->issue_id, $old_checkout->issue_id, 'Koha::Account::Line->checkout should return the correct old_checkout' ); |
496 |
is( $old_line_checkout->issue_id, $old_checkout->issue_id, 'Koha::Account::Line->checkout should return the correct old_checkout' ); |
497 |
|
497 |
|
498 |
$line->issue_id(undef)->store; |
498 |
$old_line_checkout->delete; |
|
|
499 |
$line->discard_changes; #NOTE: discard_changes refreshes the whole resultset, get_from_storage only refreshes the unjoined row |
499 |
is( $line->checkout, undef, 'Koha::Account::Line->checkout should return undef if no checkout linked' ); |
500 |
is( $line->checkout, undef, 'Koha::Account::Line->checkout should return undef if no checkout linked' ); |
500 |
|
501 |
|
501 |
$schema->storage->txn_rollback; |
502 |
$schema->storage->txn_rollback; |
502 |
- |
|
|