From aebfca4e771974c8c1edc3033addbcd767e080bf 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 Signed-off-by: Nick Clemens --- 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 6a96dc2130..eab42db643 100755 --- a/t/db_dependent/Koha/Account/Lines.t +++ b/t/db_dependent/Koha/Account/Lines.t @@ -301,7 +301,7 @@ subtest 'Keep account info when a patron is deleted' => sub { subtest 'issue() tests' => sub { - plan tests => 5; + plan tests => 6; $schema->storage->txn_begin; @@ -335,5 +335,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