Koha-clms/t/db_dependent/Koha/Patron
Tomas Cohen Arazi 540136bb47
Bug 14570: Add error handling to Koha::Patron::Relationship->store
This patch adds checks on the values for the 'relationship'. This is
done to avoid future problems when migrating relationships from the
plain text syspref into (why not) a proper table. And to preserve
consistency.

There's also catching on possible broken constraints and throwing a new
exception

Tests are added for both the new exceptions and the changes to
Koha::Patron::Relationship.

To test:
- Apply this patches
- Run:
  $ kshell
 k$ prove t/Koha/Exceptions.t \
          t/db_dependent/Koha/Patron.t \
          t/db_dependent/Koha/Patron/Relationship.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Agustin Moyano <agustinmoyano@theke.io>
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2019-08-20 16:05:57 +01:00
..
Attribute Bug 23281: Implement ->search_with_library_limits in Koha::Patron::Attribute::Types 2019-08-19 10:20:08 +01:00
Attributes.t Bug 12159: Add tests 2019-03-28 13:05:22 +00:00
Categories.t Bug 20584: Prevent Koha/Patron/Categories.t to fail randomly 2018-04-13 15:09:56 -03:00
Category.t Bug 22694: Unit tests 2019-04-24 10:51:26 +00:00
Consents.t Bug 20819: Add Koha object classes for patron consents 2018-09-20 13:45:25 +00:00
Images.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Messages.t Bug 19268: Fix TestBuilder parameter in C/Branch.t and K/P/Messaging.t 2017-09-07 13:56:08 -03:00
Modifications.t Bug 23151: (follow-up) tweaked tests 2019-07-19 09:39:21 +01:00
Relationship.t Bug 14570: Add error handling to Koha::Patron::Relationship->store 2019-08-20 16:05:57 +01:00