From d0dda7f1bc04e839c7bfd260759d33b708bf731d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 17 Dec 2018 12:14:04 -0300 Subject: [PATCH] Bug 19489: Cover non-existent issue --- t/db_dependent/Koha/Account/Lines.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/Account/Lines.t b/t/db_dependent/Koha/Account/Lines.t index 54f5321314..56c12c826c 100755 --- a/t/db_dependent/Koha/Account/Lines.t +++ b/t/db_dependent/Koha/Account/Lines.t @@ -274,7 +274,7 @@ subtest 'apply() tests' => sub { subtest 'issue() tests' => sub { - plan tests => 5; + plan tests => 6; $schema->storage->txn_begin; @@ -308,5 +308,8 @@ subtest 'issue() tests' => sub { is( ref($old_line_issue), 'Koha::Old::Checkout', 'Result type is correct' ); is( $old_line_issue->issue_id, $old_checkout->issue_id, 'Koha::Account::Line->issue should return the correct old_issue' ); + $line->issue_id(undef)->store; + is( $line->issue, undef, 'Koha::Account::Line->issue should return undef if no issue linked' ); + $schema->storage->txn_rollback; }; -- 2.11.0