]> git.koha-community.org Git - koha.git/commit
Bug 16330: Remove validation code from Koha::Patron
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 19 Dec 2017 17:46:45 +0000 (14:46 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 29 Mar 2018 14:42:07 +0000 (11:42 -0300)
commit2183c7a175f1ac3648b7963a5d18dce0cd2936f9
tree416b6ed729d45e99d0ea7111abedbdec2ebe8b74
parente36dc18376390d2747ce5d831064146817cd24c9
Bug 16330: Remove validation code from Koha::Patron

This patch removes previously added validation code from Koha::Patron
as we will rely on the DB structure and relationships to catch the same
problems. This is implemented on bug 19828.

This patch also adapts the API controller class to expect this behaviour
change from Koha::Patron. The expected exceptions are adjusted, and some
minor changes take place. The API tests are adjusted as well.

To test:
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patrons.t
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests should still pass

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Exceptions/Category.pm [deleted file]
Koha/Exceptions/Library.pm [deleted file]
Koha/Exceptions/Patron.pm [deleted file]
Koha/Patron.pm
Koha/REST/V1/Patrons.pm
t/db_dependent/Koha/Patrons.t
t/db_dependent/api/v1/patrons.t