From 3a9953bcae69949b583c6245f704a7b305d9607f Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 19 Apr 2017 11:57:33 -0300 Subject: [PATCH] Bug 18361: (QA followup) Add tests for the no params case Content-Type: text/plain; charset=utf-8 This patch adds a test for the trivial case in which no param is passed and the ->find method returns undef. For completeness purposes. Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Koha/Objects.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/Objects.t b/t/db_dependent/Koha/Objects.t index c605798..39404e8 100644 --- a/t/db_dependent/Koha/Objects.t +++ b/t/db_dependent/Koha/Objects.t @@ -100,7 +100,7 @@ subtest 'new' => sub { }; subtest 'find' => sub { - plan tests => 4; + plan tests => 5; # check find on a single PK my $patron = $builder->build({ source => 'Borrower' }); @@ -123,6 +123,8 @@ subtest 'find' => sub { my @pk = ( $rule->{branchcode}, $rule->{categorycode}, $rule->{itemtype} ); is( ref(Koha::IssuingRules->find(@pk)), "Koha::IssuingRule", 'Find returned a Koha object for composite primary key' ); + + is( Koha::Patrons->find(), undef, 'Find returns undef if no params passed' ); }; subtest 'search_related' => sub { -- 2.1.4