[Koha-bugs] [Bug 27554] Wrong test for Koha::Patrons->update_category_to child to adult

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 27 09:50:44 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27554

--- Comment #1 from Fridolin Somers <fridolin.somers at biblibre.com> ---
Created attachment 115849
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=115849&action=edit
Bug 27554: Add a test for Koha::Patrons->update_category_to child to adult

One unit test for Koha::Patrons->update_category_to seems wrong :
  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');

Child is updated to adult because he his too old, not too young.

This patch adds a test on category of patron that should be an
adult after update.

Test plan :
1) Without patch, run t/db_dependent/Patrons.t
2) It does not fail
3) Apply patch, run t/db_dependent/Patrons.t
4) It fails on test 'The over age patron has been updated to adult category'

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list