[Koha-bugs] [Bug 14598] itemtype is not set on statistics by C4::Circulation:: AddReturn

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Oct 28 10:07:57 CEST 2016


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

Marcel de Rooy <m.de.rooy at rijksmuseum.nl> changed:

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

--- Comment #117 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Created attachment 56941
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56941&action=edit
Bug 14598: (regression tests) AddReturn should store itemtype on 'statistics'
table

This patch adds tests for C4::Circulation::AddReturn(). Both tests are wrapped
inside a subtest, and look for AddReturn storing the right itemtype on the
'statistics' table.

Note: It also refactors the file a bit, to avoid side effects. And uses
TestBuilder
to make it independent on already-present db data. It also removes warnings by
mocking
C4::Context::userenv

To test:
- Apply the patch
- Run the tests:
  $ prove t/db_dependent/Circulation/Returns.t
=> FAIL: Tests fail bacause AddReturn is not storing the itemtype
- Sign off :-D

Sponsored-by: Universidad Empresarial Siglo 21

Signed-off-by: Kyle M Hall <kyle at bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen at gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy at rijksmuseum.nl>

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


More information about the Koha-bugs mailing list