Bug 11550 - Add a couple of unit tests for C4::Acq::GetOrder
Summary: Add a couple of unit tests for C4::Acq::GetOrder
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-14 11:21 UTC by Jonathan Druart
Modified: 2015-06-04 23:30 UTC (History)
3 users (show)

See Also:
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 (2.13 KB, patch)
2014-01-14 11:25 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11550: Add UT for C4::Acquisition::GetOrder (1.75 KB, patch)
2014-02-27 08:35 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11550: Add UT for C4::Acquisition::GetOrder (1.80 KB, patch)
2014-03-07 19:04 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 11550: Add UT for C4::Acquisition::GetOrder (1.79 KB, patch)
2014-03-11 16:06 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PASSED QA] Bug 11550: Add UT for C4::Acquisition::GetOrder (1.77 KB, patch)
2014-03-12 09:25 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 11550: Add UT for C4::Acquisition::GetOrder (1.97 KB, patch)
2014-03-12 09:26 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 11550: Add UT for C4::Acquisition::GetOrder (1.97 KB, patch)
2014-03-12 09:26 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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