From 37d429d505dd40934088155dd7445c6d5ba29bc6 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 31 Oct 2022 18:37:18 +0000 Subject: [PATCH] Bug 30254: Unit tests --- t/db_dependent/Koha/Item.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t index cf438e4469..53cd3b872e 100755 --- a/t/db_dependent/Koha/Item.t +++ b/t/db_dependent/Koha/Item.t @@ -1405,7 +1405,7 @@ subtest 'store() tests' => sub { subtest '_set_found_trigger() tests' => sub { - plan tests => 8; + plan tests => 9; $schema->storage->txn_begin; @@ -1475,6 +1475,14 @@ subtest 'store() tests' => sub { 'type is correct' ); + # Let's build a new item + $item = $builder->build_sample_item({ itemlost => 1, itemlost_on => dt_from_string() }); + $item->set( { itemlost => 0 } )->store; + + $messages = $item->object_messages; + warn Data::Dumper::Dumper( $messages ); + is( scalar @{$messages}, 0, 'This item has no history, no associated lost fines, presumed not lost by patron, no messages returned'); + $schema->storage->txn_rollback; }; -- 2.30.2