Bug 14097 : Avoid issue if the number of syspref shared is modified
Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
This commit is contained in:
parent
3387a6114b
commit
e3e507be9e
|
|
@ -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 ---------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue