Browse Source
This patch makes C4::Members::AddMember raise a Koha::Exceptions::BadParameter exception. The current behaviour is to just explode. Code calling AddReturn should work as expected, unless they are looking for a specific failure message. It is just explodes in a way we know what happened, in the case the categorycode is invalid. To test: - Apply the Unit tests patch - Run: $ kshell k$ prove t/db_dependent/Members.t => FAIL: Tests fail because AddReturn doesn't raise an exception - Apply this patch - Run: $ kshell k$ prove t/db_dependent/Members.t => SUCCESS: Tests pass! - Sign off :-D Signed-off-by: Dominic Pichette <dominic.pichette@inlibro.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>18.05.x
1 changed files with 13 additions and 6 deletions
Loading…
Reference in new issue