https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37892
Olivier V <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #171334|0 |1 is obsolete| | --- Comment #10 from Olivier V <[email protected]> --- Created attachment 171463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=171463&action=edit Bug 37892: Unit tests These patches will alter the checks for a patron that prevent a category with 'can_be_guarantee' from being a guarantor. Two patrons in the same category should be allowed to have a guarantee/guarantor relationship The tests below assume you are using the KTD sample data. Update borrowernumbers if not. To test: 0 - Apply tests patch 1 - Set the 'Patron' category as 'Can be a guarantee' 2 - Add a relationship between two patrons of the same category This is restricted from the staff interface perl -e 'use Koha::Patrons; my $p = Koha::Patrons->find(5)->add_guarantor({ guarantor_id => 23, relationship => 'father'});' 3 - Note there is no warning or exception. This should be allowed. 4 - Checkout an item to Edna (borrowernumber 5) 5 - Set 'TrackLastPatronActivityTriggers' to 'Checking in an item' 6 - Try to check the item in, KABOOM 7 - Set 'TrackLastPatronActivityTriggers' to 'Checking out an item' 8 - Try to issue an item to Enda, KABOOM 9 - prove -v t/db_dependent/Koha/Patron.t, fail 10 - Apply second patch 11 - prove -v t/db_dependent/Koha/Patron.t, one more test passes, but then fail 12 - Apply third patch 13 - prove -v t/db_dependent/Koha/Patron.t, pass! 14 - restart_all 15 - Checkout to Enda, OK! 16 - Checkin from Edna, OK! 17 - Find two more patrons in the category and attempt to link them 18 - 'Guarantor cannot be a guarantee' 19 - Apply fourth patch 20 - You can add a guarantor from the same category in interface 21 - Try to add a guarantor to the guarantor assigned in 20 22 - Confirm you cannot add a guarantor - "Guarantor cannot be a guarantee" Signed-off-by: Olivier V <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
