It should be returning Koha::Exceptions::MissingParameter. And is returning a generic Koha::Exceptions::ClubHold exception.
Created attachment 114793 [details] [review] Bug 27333: Regression tests Test for the right exceptions
Created attachment 114794 [details] [review] Bug 27333: Throw the right exceptions If parameters are missing, we need to throw Koha::Exceptions::MissingParameter exceptions. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Club/Hold.t => FAIL: Tests fail because the method doesn't throw the right exceptions 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D
Created attachment 115827 [details] [review] Bug 27333: Regression tests Test for the right exceptions Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 115828 [details] [review] Bug 27333: Throw the right exceptions If parameters are missing, we need to throw Koha::Exceptions::MissingParameter exceptions. To test: 1. Apply the regression tests patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Club/Hold.t => FAIL: Tests fail because the method doesn't throw the right exceptions 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Going for a straight QA here. Follows best practice and is a clear improvement. No regressions found, QA scripts pass and regression tests are included. Passing QA :)
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.03
Pushed to 20.05.x for 20.05.09
Backported: Pushed to 19.11.x branch for 19.11.15