View | Details | Raw Unified | Return to bug 14097
Collapse All | Expand All

(-)a/t/db_dependent/UsageStats.t (-4 / +5 lines)
Lines 15-21 Link Here
15
# with Koha; if not, see <http://www.gnu.org/licenses>.
15
# with Koha; if not, see <http://www.gnu.org/licenses>.
16
16
17
use Modern::Perl;
17
use Modern::Perl;
18
use Test::More tests => 551;
18
use Test::More tests => 549;
19
use t::lib::Mocks qw(mock_preference);
19
use t::lib::Mocks qw(mock_preference);
20
use POSIX qw(strftime);
20
use POSIX qw(strftime);
21
21
Lines 150-156 mocking_systempreferences_to_a_set_value(0); Link Here
150
$report = C4::UsageStats->BuildReport();
150
$report = C4::UsageStats->BuildReport();
151
isa_ok( $report,                      'HASH', '$report is a HASH' );
151
isa_ok( $report,                      'HASH', '$report is a HASH' );
152
isa_ok( $report->{systempreferences}, 'HASH', '$report->{systempreferences} is a HASH' );
152
isa_ok( $report->{systempreferences}, 'HASH', '$report->{systempreferences} is a HASH' );
153
is( scalar( keys( $report->{systempreferences} ) ), 248, "There are 248 fields in $report->{systempreferences}" );
154
verif_systempreferences_values( $report, 0 );
153
verif_systempreferences_values( $report, 0 );
155
154
156
#mock with values
155
#mock with values
Lines 159-167 mocking_systempreferences_to_a_set_value(1); Link Here
159
$report = C4::UsageStats->BuildReport();
158
$report = C4::UsageStats->BuildReport();
160
isa_ok( $report,                      'HASH', '$report is a HASH' );
159
isa_ok( $report,                      'HASH', '$report is a HASH' );
161
isa_ok( $report->{systempreferences}, 'HASH', '$report->{systempreferences} is a HASH' );
160
isa_ok( $report->{systempreferences}, 'HASH', '$report->{systempreferences} is a HASH' );
162
is( scalar( keys( $report->{systempreferences} ) ), 248, "There are 248 fields in $report->{systempreferences}" );
163
verif_systempreferences_values( $report, 1 );
161
verif_systempreferences_values( $report, 1 );
164
162
163
#Test if unwanted syspref are not sent
164
is( $report->{systempreferences}->{useDischarge}, undef, 'useDischarge should not be shared');
165
is( $report->{systempreferences}->{OpacUserJS},   undef, 'OpacUserJS   should not be shared');
166
165
# ---------- Testing ReportToCommunity ----------
167
# ---------- Testing ReportToCommunity ----------
166
168
167
# ---------- Testing _count ---------------------
169
# ---------- Testing _count ---------------------
168
- 

Return to bug 14097