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

Martin Renvoize <[email protected]> changed:

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

--- Comment #6 from Martin Renvoize <[email protected]> ---
Created attachment 117715
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117715&action=edit
Bug 27858: Make Koha::Patron::Attribute->store raise an exception on invalid
type/code

This patch adds type validation to the ->store method. And exception
should be thrown if the type is invalid. Things currently explode in
such situations, so this doesn't change the behavior (just adding more
informative failure information).

To test:
1. Apply the previous patches
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Patron/Attribute.t
=> FAIL: No exception is thrown on the bad case, weird error
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! Exception thrown!
5. Sign off :-D

Signed-off-by: Martin Renvoize <[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/

Reply via email to