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

Matt Blenkinsop <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #166177|0                           |1
        is obsolete|                            |

--- Comment #36 from Matt Blenkinsop <[email protected]> ---
Created attachment 167725
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167725&action=edit
Bug 28924: Add unit tests for new methods and update existing tests

This commit adds unit tests for the two new methods introduced and also updates
all unit tests that use the noissuecharge sysprefs

Test plan:
1. Choose a patron and note their patron category
2. Create a manual invoice on that patron for 6.00
3. Try to check an item out to the patron and it will show a message saying
that checkout is blocked because the fine balance is over the limit.
4. This is because the default global value for the ‘noissuescharge’ is 5.00
and we are now over that limit
5. Navigate to Administration > Patron categories and click to edit the
category relevant to your patron
6. At the bottom of the form will be fields called No Issues Charge, No Issues
Charge Guarantees and No Issues Charge Guarantors With Guarantees. Set those
fields to 7
7. Now try and checkout again - this time you will be allowed to checkout as
the category level limit is higher than the fine we set.
8. Choose a different patron (patron 2) with a category that is different to
the first patron (patron 1).
9. Repeat steps 2 and 3. This time checkout will be blocked again because the
limit for this patron category is still the global value of 5.00
10. Choose a third patron with a category of child or similar (patron 3)
11. Make patron 1 a guarantor for patron 3
12. Edit patron 3’s patron category and set the limit for No Issues Charge, No
Issues Charge Guarantees and No Issues Charge Guarantors With Guarantees to 5.
13. Try to check out to patron 3 and it will be blocked due to the fines on
patron 1’s account
14. Try to checkout to patron 1 - it should still be possible
15. Add a fine to patron 3’s account for 2.00
16. Try to check out to patron 1 - the checkout will be blocked due to the
total of 8 now owed by the patron and its guarantees

Test plan:
prove t/db_dependent/SIP/Transaction.t
prove t/db_dependent/SIP/Patron.t
prove t/db_dependent/Circulation/NoIssuesChargeGuarantees.t
prove t/db_dependent/Koha/Patron.t

-- 
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/

Reply via email to