Bug 24901

Summary: C4::Circulation::transferbook lacks tests
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Test SuiteAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: 1joynelson, jonathan.druart, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.05
Bug Depends on:    
Bug Blocks: 24299    
Attachments: Bug 24901: Minor refactor of tests
Bug 24901: Add tests for transferbook
Bug 24901: Minor refactor of tests
Bug 24901: Add tests for transferbook
Bug 24901: Fix tests for 19.11.x

Description Martin Renvoize 2020-03-19 07:36:11 UTC
The transferbook method in C4::Circulation is lacking allot of tests.. I'd like to remove this method entirely at some point, but before we do that I think we need thorough tests adding to prevent refressions.
Comment 1 Martin Renvoize 2020-03-19 08:13:57 UTC
Created attachment 100996 [details] [review]
Bug 24901: Minor refactor of tests

Test plan:
0/ Read the change and verify it makes sense
Comment 2 Martin Renvoize 2020-03-19 08:14:00 UTC
Created attachment 100997 [details] [review]
Bug 24901: Add tests for transferbook

Test plan:
0/ Read the commit and confirm the new tests make sence
1/ Run the tests and verify they pass
2/ Signoff
Comment 3 Nick Clemens 2020-03-19 12:20:31 UTC
Created attachment 101007 [details] [review]
Bug 24901: Minor refactor of tests

Test plan:
0/ Read the change and verify it makes sense

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Nick Clemens 2020-03-19 12:20:34 UTC
Created attachment 101008 [details] [review]
Bug 24901: Add tests for transferbook

Test plan:
0/ Read the commit and confirm the new tests make sence
1/ Run the tests and verify they pass
2/ Signoff

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Nick Clemens 2020-03-19 12:21:30 UTC
Tests only, passing QA
Comment 6 Jonathan Druart 2020-03-19 13:24:39 UTC
Maybe remove that before push:

+#subtest 'UseBranchTransferLimits tests' => sub {
+#    plan tests => 0;
+#};
+
Comment 7 Martin Renvoize 2020-03-20 10:25:19 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 8 Joy Nelson 2020-04-03 20:54:10 UTC
backported to 19.11.x branch for 19.11.05
Comment 9 Jonathan Druart 2020-04-07 13:37:32 UTC
Created attachment 102519 [details] [review]
Bug 24901: Fix tests for 19.11.x
Comment 10 Joy Nelson 2020-04-15 18:41:18 UTC
19.11.x patch applied.