[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
Sat Jan 30 06:51:05 CET 2021


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

David Nind <david at davidnind.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #116040|0                           |1
        is obsolete|                            |

--- Comment #3 from David Nind <david at davidnind.com> ---
Created attachment 116089
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116089&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=18416

Signed-off-by: David Nind <david at davidnind.com>

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


More information about the Koha-bugs mailing list