Bug 10710 - UT : OfflineOperation's routines in C4/Circulation.t need unit tests.
Summary: UT : OfflineOperation's routines in C4/Circulation.t need unit tests.
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: kenza
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 10681 10711
  Show dependency treegraph
 
Reported: 2013-08-12 12:09 UTC by kenza
Modified: 2014-12-07 20:02 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 10710 : OfflineOperation's routines in C4/Circulation.pm need unit tests. (3.85 KB, patch)
2013-08-12 12:24 UTC, kenza
Details | Diff | Splinter Review
Bug 10710: add unit tests for OfflineOperation's routines in C4/Circulation.pm (3.91 KB, patch)
2013-08-14 16:45 UTC, Galen Charlton
Details | Diff | Splinter Review
Bug 10710: (follow-up) perltidy new code (2.24 KB, patch)
2013-08-14 16:45 UTC, Galen Charlton
Details | Diff | Splinter Review
[PASSED QA] Bug 10710: add unit tests for OfflineOperation's routines in C4/Circulation.pm (3.98 KB, patch)
2013-08-25 18:02 UTC, Katrin Fischer
Details | Diff | Splinter Review
[PASSED QA] Bug 10710: (follow-up) perltidy new code (2.31 KB, patch)
2013-08-25 18:02 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 kenza 2013-08-12 12:09:20 UTC
AddOfflineOperation, GetOfflineOperation, GetOfflineOperations, DeleteOfflineOperation need unit tests.
Comment 1 kenza 2013-08-12 12:24:57 UTC Comment hidden (obsolete)
Comment 2 Galen Charlton 2013-08-14 16:45:37 UTC Comment hidden (obsolete)
Comment 3 Galen Charlton 2013-08-14 16:45:46 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2013-08-25 18:02:34 UTC
Created attachment 20598 [details] [review]
[PASSED QA] Bug 10710: add unit tests for OfflineOperation's routines in C4/Circulation.pm

This patch test AddOfflineOperation,GetOfflineOperation and
DeleteOfflineOperation in C4/Circulation.pm.

The tests are wrapped in a transaction.

Note: Currently, GetOfflineOperations is not tested because we cannot
mock C4::Context->userenv in unit tests

To test:

prove t/db_dependent/Circulation_OfflineOperation.t
t/db_dependent/Circulation_OfflineOperation.t .. ok
All tests successful.
Files=1, Tests=7, 19 wallclock secs ( 0.01 usr  0.01 sys +  0.33 cusr  0.02 csys =  0.37 CPU

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 5 Katrin Fischer 2013-08-25 18:02:44 UTC
Created attachment 20599 [details] [review]
[PASSED QA] Bug 10710: (follow-up) perltidy new code

Also, I prefer the use of parentheses for function
calls, even when no arguments are being passed.
One missed comma turns

is(GetOfflineOperation, ...)

into

is(GetOfflineOperation ...)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Comment 6 Galen Charlton 2013-08-28 14:53:17 UTC
Pushed to master.  Thanks, Kenza!
Comment 7 Tomás Cohen Arazi 2013-09-13 18:01:36 UTC
This patch has been pushed to 3.12.x, will be in 3.12.5.

Thanks Kenza!