]> git.koha-community.org Git - koha.git/commit
Bug 14598: (regression tests) AddReturn should store itemtype on 'statistics' table
authorTomas Cohen Arazi <tomascohen@theke.io>
Sun, 26 Jul 2015 05:05:16 +0000 (02:05 -0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 28 Oct 2016 11:29:56 +0000 (11:29 +0000)
commit357a69b0e174c813ef52d1ee7f47cd810c76938d
tree489a5fef4e0a4e6e77dfad65f725aedb2944bae4
parentbfcc7cad70bfc23163865b2ff39eb592d6d9d152
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@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
t/db_dependent/Circulation/Returns.t