Bugzilla – Attachment 41843 Details for
Bug 14097
Add unit tests to C4::UsageStats
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14097 : Avoid issue if the number of syspref shared is modified
Bug-14097--Avoid-issue-if-the-number-of-syspref-sh.patch (text/plain), 1.92 KB, created by
Julian FIOL
on 2015-08-24 12:08:52 UTC
(
hide
)
Description:
Bug 14097 : Avoid issue if the number of syspref shared is modified
Filename:
MIME Type:
Creator:
Julian FIOL
Created:
2015-08-24 12:08:52 UTC
Size:
1.92 KB
patch
obsolete
>From 582609d5e194c2e9eb2818e9c85ca95fee9a3b71 Mon Sep 17 00:00:00 2001 >From: Julian FIOL <julian.fiol@biblibre.com> >Date: Mon, 24 Aug 2015 13:50:16 +0200 >Subject: [PATCH] Bug 14097 : Avoid issue if the number of syspref shared is > modified > >--- > t/db_dependent/UsageStats.t | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/UsageStats.t b/t/db_dependent/UsageStats.t >index b98f05b..0a582d0 100644 >--- a/t/db_dependent/UsageStats.t >+++ b/t/db_dependent/UsageStats.t >@@ -15,7 +15,7 @@ > # with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Test::More tests => 551; >+use Test::More tests => 549; > use t::lib::Mocks qw(mock_preference); > use POSIX qw(strftime); > >@@ -150,7 +150,6 @@ mocking_systempreferences_to_a_set_value(0); > $report = C4::UsageStats->BuildReport(); > isa_ok( $report, 'HASH', '$report is a HASH' ); > isa_ok( $report->{systempreferences}, 'HASH', '$report->{systempreferences} is a HASH' ); >-is( scalar( keys( $report->{systempreferences} ) ), 248, "There are 248 fields in $report->{systempreferences}" ); > verif_systempreferences_values( $report, 0 ); > > #mock with values >@@ -159,9 +158,12 @@ mocking_systempreferences_to_a_set_value(1); > $report = C4::UsageStats->BuildReport(); > isa_ok( $report, 'HASH', '$report is a HASH' ); > isa_ok( $report->{systempreferences}, 'HASH', '$report->{systempreferences} is a HASH' ); >-is( scalar( keys( $report->{systempreferences} ) ), 248, "There are 248 fields in $report->{systempreferences}" ); > verif_systempreferences_values( $report, 1 ); > >+#Test if unwanted syspref are not sent >+is( $report->{systempreferences}->{useDischarge}, undef, 'useDischarge should not be shared'); >+is( $report->{systempreferences}->{OpacUserJS}, undef, 'OpacUserJS should not be shared'); >+ > # ---------- Testing ReportToCommunity ---------- > > # ---------- Testing _count --------------------- >-- >2.4.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14097
:
38719
|
38800
|
38814
|
38946
|
38947
|
38948
|
39080
|
39085
|
39435
|
41837
|
41843
|
41844
|
46200
|
46201
|
46202
|
46203
|
46204
|
46205
|
46206
|
46207
|
46208
|
46209
|
46210
|
46211
|
46212
|
46213
|
46214
|
46215
|
47717
|
47719
|
47720
|
47721
|
47722
|
47723
|
47724
|
47725
|
47726
|
47727
|
47798
|
47799
|
47800
|
47801
|
47802
|
47803
|
47804
|
47805