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

--- Comment #6 from Frédéric Demians <[email protected]> ---
Created attachment 208342
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208342&action=edit
Bug 43807: Add regression tests

This patch adds tests for check_mandatory_fields() covering fields the
patron entry form does not render: person-only fields for organisation
(type I) categories, and fields listed in BorrowerUnwantedField. Those
can never be filled from the staff interface, so enforcing them makes
it impossible to save the patron (see comment 2).

The tests are expected to fail with the current patch. A follow-up is
needed in check_mandatory_fields() to make them pass, while keeping
the fields the form does render (surname for organisations, firstname
for persons) mandatory.

Test plan:
1. Apply patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Patron.t
=> FAIL: Tests fail! Organisation patrons and unwanted fields are rejected
3. Apply the follow-up fixing check_mandatory_fields()
4. Repeat step 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Assisted-by: Opus 5.5 (Anthropic)
Signed-off-by: Frédéric Demians <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to