[Koha-bugs] [Bug 18146] C4::Circulation CanBookBeRenewed lacks full test coverage.

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 29 16:27:54 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18146

--- Comment #1 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 116040
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116040&action=edit
Bug 18146: Fix tests for OverduesBlockRenewing

This pref was supposedly covered by tests, but the conditions were wrong
and we didn't test the reasons we were failing so the code was being missed

To test:
1 - Add a warn around in the conditional at line 2748:
} elsif ( ($hasoverdues and $overduesblockrenewing eq 'block') ||
($itemissue->{overdue} and $overduesblockrenewing eq 'blockitem') ) {
     warn "SUCCESS!"
     return ( 0, 'overdue');
}
2 - prove -v t/db_dependent/Circulation.t | grep SUCCESS
3 - No output
4 - Apply patch
5 - Repeat
6 - SUCCESS!

https://bugs.koha-community.org/show_bug.cgi?id=18146

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list