From 9b29c0ed84cf7eca651bd544d892994d638245ae Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 14 Dec 2018 16:14:42 -0300 Subject: [PATCH] Bug 22006: Add tests Signed-off-by: Pierre-Marc Thibault Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens (cherry picked from commit 58f04600f084e2bb5306f18bba1b9a0b22e1664b) Signed-off-by: Martin Renvoize (cherry picked from commit 4d3510f89ccad4083aeb739f9a738ddc1cbf6741) Signed-off-by: Lucas Gass --- 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 4b795bdb5e..656feeb938 100755 --- a/t/db_dependent/Koha/Account/Lines.t +++ b/t/db_dependent/Koha/Account/Lines.t @@ -31,7 +31,7 @@ my $builder = t::lib::TestBuilder->new; subtest 'item' => sub { - plan tests => 2; + plan tests => 3; $schema->storage->txn_begin; @@ -60,6 +60,9 @@ subtest 'item' => 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; }; -- 2.39.5