Summary: | C4::Acquisition need more UT, and more robust ones. | ||
---|---|---|---|
Product: | Koha | Reporter: | Mathieu Saby <mathsabypro> |
Component: | Acquisitions | Assignee: | Mathieu Saby <mathsabypro> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | gmcharlt, kyle, liz |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 11170 | ||
Attachments: |
[PATCH] Bug 11224 : Add UT to subs of C4::Acquisition returning order(s)
[PATCH] Bug 11224 : Add UT to subs of C4::Acquisition returning order(s) Bug 11224 : Add UT to subs of C4::Acquisition returning order(s) Bug 11224 : Add UT to subs of C4::Acquisition returning order(s) |
Description
Mathieu Saby
2013-11-09 13:35:34 UTC
Created attachment 22848 [details] [review] [PATCH] Bug 11224 : Add UT to subs of C4::Acquisition returning order(s) C4::Acquisition need more UT, and more robust ones. This patch adds UT to - GetOrder - GetOrders - GetCancelledOrders - GetLateOrders It refactors UT for SearchOrders New UT use 2 new subs, used for check the list of fields returns by a sub. _check_fields_of_order _check_fields_of_orders These 2 subs could later be used by other UT _check_fields_of_order has its own UT (tests n°14,15,16). They should maybe be commented after this patch is QAed. to test : prove t/db_dependent/Acquisition.t -v When this patch is pushed, I will provide other bugs for improving C4::Acquisition subs Mathieu Created attachment 23042 [details] [review] [PATCH] Bug 11224 : Add UT to subs of C4::Acquisition returning order(s) Hi Liz I see a new attachment but no change in status. Does it means you have signed off the patch? Mathieu Created attachment 23106 [details] [review] Bug 11224 : Add UT to subs of C4::Acquisition returning order(s) C4::Acquisition need more UT, and more robust ones. This patch adds UT to - GetOrder - GetOrders - GetCancelledOrders - GetLateOrders It refactors UT for SearchOrders New UT use 2 new subs, used for check the list of fields returns by a sub. _check_fields_of_order _check_fields_of_orders These 2 subs could later be used by other UT _check_fields_of_order has its own UT (tests n°14,15,16). They should maybe be commented after this patch is QAed. to test : prove t/db_dependent/Acquisition.t -v Signed-off-by: Liz Rea <liz@catalyst.net.nz> Unit tests pass, passes koha-qa. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Passes koha-qa and t Created attachment 23347 [details] [review] Bug 11224 : Add UT to subs of C4::Acquisition returning order(s) Patch rebased after the integration of BZ 11111 Note that with my patch, there will be no more need to add specific tests to check if a specific key is returned by a function. What you must do if a new key is added to the hash returned by a sub is to add the new keys in the array listing all expected keys for a sub. So I suppressed the 2 new tests added by Jonathan for bz 11111 and I added the 2 new keys in the array of expected keys for SearchOrders sub. I ran prove t/db_dependant/Acquisition.t with the rebased patch. All is correct. Mathieu Is there something preventing the pushing of this patch into master? It blocks BZ 10758... Mathieu |