Koha-clms/t/db_dependent/Circulation
Tomas Cohen Arazi db99e5ff04 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: Mason James <mtj@kohaaloha.com>
2016-12-12 14:54:10 +13:00
..
IssuingRules Bug 17592: Remove itemtype-related maxsuspensiondays.t warnings 2016-12-12 14:54:09 +13:00
AnonymiseIssueHistory.t Bug 16155: Adjust a few other tests 2016-05-04 13:47:58 +00:00
Branch.t Bug 16404: Fix Circulation/Branch.t (tests 8-11) 2016-05-03 15:21:31 +00:00
CalcDateDue.t Bug 12787: (QA followup) small QA fixes 2016-04-22 00:54:35 +00:00
CalcFine.t Bug 16155: Adjust a few other tests 2016-05-04 13:47:58 +00:00
CheckIfIssuedToPatron.t Bug 15629: Koha::Libraries - Remove ModBranch 2016-02-24 03:55:06 +00:00
CheckValidBarcode.t Bug 15629: Koha::Libraries - Remove ModBranch 2016-02-24 03:55:06 +00:00
GetHardDueDate.t Bug 12787: Reorganise t/db_dependent files 2016-04-22 00:54:35 +00:00
GetIssues.t Bug 15629: Koha::Libraries - Remove ModBranch 2016-02-24 03:55:06 +00:00
GetTopIssues.t Bug 11998: Use t::lib::Mocks::mock_preference in tests 2016-03-15 07:08:28 +00:00
IsItemIssued.t Bug 17587: Remove itemtype-related IsItemIssued.t warnings 2016-12-12 14:54:09 +13:00
MarkIssueReturned.t Bug 17430: Make MarkIssueReturned.t create its own data 2016-10-22 14:57:56 +02:00
NoIssuesChargeGuarantees.t Bug 16405: Fix Circulation/NoIssuesChargeGuarantees.t test 2 2016-05-04 14:23:34 +00:00
OfflineOperation.t Bug 12787: Reorganise t/db_dependent files 2016-04-22 00:54:35 +00:00
Returns.t Bug 14598: (regression tests) AddReturn should store itemtype on 'statistics' table 2016-12-12 14:54:10 +13:00
TooMany.t Bug 14045: Fix failing tests if issuing rules exist 2015-11-06 12:01:14 -03:00
dateexpiry.t Bug 12787: Reorganise t/db_dependent files 2016-04-22 00:54:35 +00:00
issue.t Bug 17572: [QA Follow-up] Cosmetic changes 2016-12-12 14:54:09 +13:00
transfers.t Bug 12787: (QA followup) small QA fixes 2016-04-22 00:54:35 +00:00