From f31c5428c17e9bf6afde3b9ab1e082273edec176 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 29 Apr 2020 09:27:22 -0300 Subject: [PATCH] Bug 25296: Tests for uninstantiated behaviour Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart --- t/db_dependent/Koha/Objects.t | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/Objects.t b/t/db_dependent/Koha/Objects.t index 2af778a85a..632d770644 100644 --- a/t/db_dependent/Koha/Objects.t +++ b/t/db_dependent/Koha/Objects.t @@ -802,7 +802,7 @@ subtest 'prefetch_whitelist() tests' => sub { subtest 'empty() tests' => sub { - plan tests => 3; + plan tests => 5; $schema->storage->txn_begin; @@ -814,5 +814,9 @@ subtest 'empty() tests' => sub { is( ref($empty), 'Koha::Patrons', '->empty returns a Koha::Patrons iterator' ); is( $empty->count, 0, 'The empty resultset is, well, empty :-D' ); + $empty = Koha::Patrons->empty; + is( ref($empty), 'Koha::Patrons', 'without being instantiated, ->empty still returns a Koha::Patrons iterator' ); + is( $empty->count, 0, 'The empty resultset is, well, empty :-D' ); + $schema->storage->txn_rollback; }; -- 2.20.1