[Koha-bugs] [Bug 31676] Fix db_dependent/Circulation.t tests

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Oct 5 19:23:45 CEST 2022


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

--- Comment #7 from David Gustafsson <glasklas at gmail.com> ---
To make the 'Incremented fee tests' fail set CircControl to "ItemHomeLibrary"
(which is the default) and HomeOrHoldingBranch to "homebranch" (default is
"holdingbranch"). The test will now fail since the item does not have the
correct homebranch set (since is set using $library->{branchcode} where library
is an object).

The reason why the tests pass anyway despite missing both homebranch and
holdingbranch is that holdingbranch is set when one of the tests calls AddIssue
which will in turn set the expected holdingbranch from userenv
($item_object->holdingbranch(C4::Context->userenv->{'branch'}));

The $item will then have the expected homebranch (but not holdingbranch) for
the rest of the tests. If the item is passed the correct branch value to begin
with all combinations of the above settings will work.

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


More information about the Koha-bugs mailing list