From 3b871de55d7928c208c648240de61e995bbd7275 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 17 Aug 2021 11:36:57 -0300 Subject: [PATCH] Bug 28871: Regression test Content-Type: text/plain; charset=utf-8 Signed-off-by: Martin Renvoize Signed-off-by: Marcel de Rooy --- t/db_dependent/Koha/Objects.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/Objects.t b/t/db_dependent/Koha/Objects.t index 554b631741..eaf5e75bf2 100755 --- a/t/db_dependent/Koha/Objects.t +++ b/t/db_dependent/Koha/Objects.t @@ -1219,7 +1219,7 @@ subtest 'prefetch_whitelist() tests' => sub { subtest 'empty() tests' => sub { - plan tests => 6; + plan tests => 7; $schema->storage->txn_begin; @@ -1242,6 +1242,9 @@ subtest 'empty() tests' => sub { is( "$@", 'Tried to access the \'empty\' method, but Koha::Patrons is not instantiated', 'Exception stringified correctly' ); + my @patrons = Koha::Patrons->new->empty; + is( scalar @patrons, 0, 'List context makes ->empty return an empty list' ); + $schema->storage->txn_rollback; }; -- 2.20.1