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

(-)a/t/db_dependent/UsageStats.t (-2 / +4 lines)
Lines 68-74 subtest 'NeedUpdate() tests' => sub { Link Here
68
68
69
subtest 'BuildReport() tests' => sub {
69
subtest 'BuildReport() tests' => sub {
70
70
71
    plan tests => 30;
71
    plan tests => 32;
72
72
73
    $schema->storage->txn_begin;
73
    $schema->storage->txn_begin;
74
74
Lines 108-113 subtest 'BuildReport() tests' => sub { Link Here
108
    t::lib::Mocks::mock_preference( "UsageStatsCountry",       'COUNTRY' );
108
    t::lib::Mocks::mock_preference( "UsageStatsCountry",       'COUNTRY' );
109
    t::lib::Mocks::mock_preference( "UsageStatsLibrariesInfo", 1 );
109
    t::lib::Mocks::mock_preference( "UsageStatsLibrariesInfo", 1 );
110
    t::lib::Mocks::mock_preference( "UsageStatsGeolocation",   1 );
110
    t::lib::Mocks::mock_preference( "UsageStatsGeolocation",   1 );
111
    t::lib::Mocks::mock_preference( "IntranetUserJS",          'This is some javascript' );
111
112
112
    $report = C4::UsageStats->BuildReport();
113
    $report = C4::UsageStats->BuildReport();
113
114
Lines 121-126 subtest 'BuildReport() tests' => sub { Link Here
121
    is( $report->{installation}->{country},     'COUNTRY',              "UsageStatsCountry is good" );
122
    is( $report->{installation}->{country},     'COUNTRY',              "UsageStatsCountry is good" );
122
    is( $report->{installation}->{geolocation}, '1',                    "UsageStatsGeolocation is good" );
123
    is( $report->{installation}->{geolocation}, '1',                    "UsageStatsGeolocation is good" );
123
    ok( exists $report->{systempreferences}, 'systempreferences is present' );
124
    ok( exists $report->{systempreferences}, 'systempreferences is present' );
125
    is( $report->{systempreferences}->{IntranetUserJS},  'Used',  "IntranetUserJS  is good" );
126
    is( $report->{systempreferences}->{IntranetUserCSS}, 'Empty', "IntranetUserCSS is good" );
124
127
125
    isa_ok( $report,              'HASH', '$report is a HASH' );
128
    isa_ok( $report,              'HASH', '$report is a HASH' );
126
    isa_ok( $report->{volumetry}, 'HASH', '$report->{volumetry} is a HASH' );
129
    isa_ok( $report->{volumetry}, 'HASH', '$report->{volumetry} is a HASH' );
127
- 

Return to bug 23898