@@ -, +, @@ --- t/db_dependent/Koha/Account/Lines.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/t/db_dependent/Koha/Account/Lines.t +++ a/t/db_dependent/Koha/Account/Lines.t @@ -34,7 +34,7 @@ my $builder = t::lib::TestBuilder->new; subtest 'item() tests' => sub { - plan tests => 2; + plan tests => 3; $schema->storage->txn_begin; @@ -63,6 +63,9 @@ subtest 'item() tests' => sub { is( ref( $account_line_item ), 'Koha::Item', 'Koha::Account::Line->item should return a Koha::Item' ); is( $line->itemnumber, $account_line_item->itemnumber, 'Koha::Account::Line->item should return the correct item' ); + $line->itemnumber(undef)->store; + is( $line->item, undef, 'Koha::Account::Line->item should return undef if no item linked' ); + $schema->storage->txn_rollback; }; --