Koha-clms/t/db_dependent/Circulation
Tomas Cohen Arazi 465e1a203f 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>
(cherry picked from commit 357a69b0e1)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
2016-11-30 13:48:04 +01:00
..
IssuingRules Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
AnonymiseIssueHistory.t Bug 15081: (followup) Make test files using TestBuilder handle their transactions 2015-11-04 12:32:57 -03:00
CheckIfIssuedToPatron.t
…
CheckValidBarcode.t
…
GetIssues.t Bug 11201: Add a in-house use list pages 2015-03-31 11:30:55 -03:00
GetTopIssues.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-23 07:51:29 +01:00
IsItemIssued.t Bug 14878: Tests - Create the branchcodes when needed 2015-11-06 15:51:51 -03:00
MarkIssueReturned.t Bug 9942: Make Koha fails if privacy is not respected 2015-07-07 14:52:32 -03:00
Returns.t Bug 14598: (regression tests) AddReturn should store itemtype on 'statistics' table 2016-11-30 13:48:04 +01:00
TooMany.t Bug 14045: Fix failing tests if issuing rules exist 2015-11-06 12:01:14 -03:00