Summary: | Wrong exception thrown in Koha::Club::Hold::add | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Architecture, internals, and plumbing | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrew, caroline.cyr-la-rose, fridolin.somers, martin.renvoize, tomascohen, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.03,20.05.09,19.11.15
|
|
Circulation function: | |||
Bug Depends on: | 27327 | ||
Bug Blocks: | 27330 | ||
Attachments: |
Bug 27333: Regression tests
Bug 27333: Throw the right exceptions Bug 27333: Regression tests Bug 27333: Throw the right exceptions |
Description
Tomás Cohen Arazi (tcohen)
2021-01-04 14:14:12 UTC
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 |