Bug 11550

Summary: Add a couple of unit tests for C4::Acq::GetOrder
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: AcquisitionsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: fridolin.somers, gmcharlt, matted-34813
Version: Main   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10789
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 11550: GetOrder always returns a non empty hashref
Bug 11550: Add UT for C4::Acquisition::GetOrder
Bug 11550: Add UT for C4::Acquisition::GetOrder
Bug 11550: Add UT for C4::Acquisition::GetOrder
[PASSED QA] Bug 11550: Add UT for C4::Acquisition::GetOrder
[PASSED QA] Bug 11550: Add UT for C4::Acquisition::GetOrder
[PASSED QA] Bug 11550: Add UT for C4::Acquisition::GetOrder

Description Jonathan Druart 2014-01-14 11:21:34 UTC
I did not find somewhere it can cause a problem, but the GetOrder routine always returns a hashref with a key 'orderdate'.
Comment 1 Jonathan Druart 2014-01-14 11:25:28 UTC Comment hidden (obsolete)
Comment 2 wajasu 2014-02-26 16:25:56 UTC
Can you rebase. Got merge conflicts, and I'll try again. - wajasu
Comment 3 Jonathan Druart 2014-02-27 08:35:13 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2014-02-27 08:36:49 UTC
The concern of this patch has been fixed by bug 10789.
I think we could keep the unit tests.
Comment 5 Kyle M Hall (khall) 2014-03-07 19:04:31 UTC Comment hidden (obsolete)
Comment 6 Katrin Fischer 2014-03-11 14:21:57 UTC
Patch doesn't apply and I think it needs some refactoring with the recent changes to Acquisition.t
Comment 7 Jonathan Druart 2014-03-11 16:06:28 UTC Comment hidden (obsolete)
Comment 8 Katrin Fischer 2014-03-12 09:25:20 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2014-03-12 09:26:19 UTC Comment hidden (obsolete)
Comment 10 Katrin Fischer 2014-03-12 09:26:32 UTC
Created attachment 26146 [details] [review]
[PASSED QA] Bug 11550: Add UT for C4::Acquisition::GetOrder

If GetOrder is called with a nonexistent ordernumber or without any
ordernumber, it should return undef.

Test plan:
prove t/db_dependent/Acquisition.t

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Updated number of tests to 68, tests and QA script all happy now.
Looked at a few pages in aquisition using GetOrder as well.
Comment 11 Galen Charlton 2014-03-12 14:56:40 UTC
Pushed to master.  Thanks, Jonathan!
Comment 12 Fridolin Somers 2014-06-04 09:16:05 UTC
Pushed to 3.14.x, will be in 3.14.08