From d34e85b76f11f0ea62685cad0ba28d20093473d9 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Tue, 26 Jan 2021 16:17:32 +0100 Subject: [PATCH] Bug 27554: Fix test for Koha::Patrons->update_category_to child to adult This patch fixes the test by using too_old instead of too_young Test plan : Apply patch, run t/db_dependent/Patrons.t, tests are OK --- t/db_dependent/Patrons.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/db_dependent/Patrons.t b/t/db_dependent/Patrons.t index e890472a37..5f81ba33cb 100755 --- a/t/db_dependent/Patrons.t +++ b/t/db_dependent/Patrons.t @@ -195,7 +195,7 @@ subtest "Update patron categories" => sub { is( Koha::Patrons->search_patrons_to_update_category({from=>$c_categorycode})->update_category_to({category=>$c_categorycode_2}),3,'Three child patrons updated to another child category with no params passed'); is( Koha::Patrons->find($adult1->borrowernumber)->guarantee_relationships->guarantees->count,3,'Guarantees not removed when made changing child categories'); - is( Koha::Patrons->search_patrons_to_update_category({from=>$c_categorycode_2,too_young=>1})->update_category_to({category=>$a_categorycode}),1,'One child patron updated to adult category'); + is( Koha::Patrons->search_patrons_to_update_category({from=>$c_categorycode_2,too_old=>1})->update_category_to({category=>$a_categorycode}),1,'One child patron updated to adult category'); is( Koha::Patrons->find($child3->borrowernumber)->categorycode,$a_categorycode,'The over age patron has been updated to adult category'); is( Koha::Patrons->find($adult1->borrowernumber)->guarantee_relationships->guarantees->count,2,'Guarantee was removed when made adult'); -- 2.30.0