@@ -, +, @@ --- t/db_dependent/Koha/SearchEngine/Indexer.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/t/db_dependent/Koha/SearchEngine/Indexer.t +++ a/t/db_dependent/Koha/SearchEngine/Indexer.t @@ -61,7 +61,7 @@ subtest 'Test indexer object creation' => sub { }; subtest 'Test indexer calls' => sub { - plan tests => 36; + plan tests => 40; my @engines = ('Zebra'); eval { Koha::SearchEngine::Elasticsearch->get_elasticsearch_params; }; @@ -158,6 +158,12 @@ subtest 'Test indexer calls' => sub { warnings_are{ AddReturn($item->barcode, $item->homebranch, 0, undef); } [$engine,'C4::Circulation'], "index_records is called once for $engine when calling AddReturn if item not issued"; + warnings_are{ + LostItem( $item->itemnumber, "tests", 1); + } [$engine,"Koha::Item"], "index_records is called for $engine when calling LostItem with 'force_mark_returned'"; + warnings_are{ + LostItem( $item->itemnumber, "tests", 1, { skip_record_index => 1 }); + } undef, "index_records is not called for $engine when calling LostItem with 'force_mark_returned' if skip_record_index"; $item->datelastseen('2020-02-02'); $item->store({skip_record_index=>1}); --