Bug 14097: Testing C4::UsageStats
authorJulian FIOL <julian.fiol@biblibre.com>
Fri, 10 Apr 2015 09:07:39 +0000 (11:07 +0200)
committerJulian Maurice <julian.maurice@biblibre.com>
Mon, 7 Mar 2016 13:22:01 +0000 (14:22 +0100)
commit30c18a39ffde1f8aba7945032308ce47b8d12564
treef23b8a25b87d400ce78327da364ba5e8278dd8eb
parentc4e64889fd1b1cf99f974a28e3f40f6f06f6def7
Bug 14097: Testing C4::UsageStats

DESCRIPTION
-----------

Add unit tests to C4::UsageStats
Subroutine :
(V : tested, X : Not tested)

V  NeedUpdate
V  BuiltReport
X  ReportToCommunity
V  _count

TEST PLAN
---------

1. Apply patch
2. prove -v t/db_dependent/UsageStats.t
-- All tests should run successfully

/!\ I have 1 warning but I don't know where it can come /!\
(in cleanup) DBIx::Class::Storage::txn_rollback(): A txn_rollback
in nested transaction is ineffective! (depth 1) at
t/lib/TestBuilder.pm line 308

TEST PLAN OPTIONAL
------------------

Go check bug 13899 to see the coverage of this module.

Coverage BEFORE this patch :
Statement  :  40,5%
Branch     :   0,0%
Condition  :   0,0%
Subroutine :  55,6%

Coverage AFTER this patch :
Statement  :  81,0%
Branch     : 100,0%
Condition  : 100,0%
Subroutine :  88,8%

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit b44b7224e079a983c991aa06eaae11c350871814)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
C4/UsageStats.pm
t/db_dependent/UsageStats.t [new file with mode: 0644]