diff --git a/lemonldap-ng-manager/t/11-save-appCat-changed-conf.t b/lemonldap-ng-manager/t/11-save-appCat-changed-conf.t index 4e9c48afb..eeb758842 100644 --- a/lemonldap-ng-manager/t/11-save-appCat-changed-conf.t +++ b/lemonldap-ng-manager/t/11-save-appCat-changed-conf.t @@ -38,7 +38,7 @@ while ( my $body = &body() ) { #print STDERR Dumper($resBody); ok( $resBody->{result} == 1, "$desc: JSON response contains \"result:1\"" ); - ok( @{ $resBody->{details}->{__changes__} } eq 1, + ok( @{ $resBody->{details}->{__changes__} } eq 2, "$desc: conf has changed" ) or print STDERR Dumper($resBody); ok( diff --git a/lemonldap-ng-manager/t/11-save-changed-conf-with-confirmation.t b/lemonldap-ng-manager/t/11-save-changed-conf-with-confirmation.t index c2a0d506c..15337eaf2 100644 --- a/lemonldap-ng-manager/t/11-save-changed-conf-with-confirmation.t +++ b/lemonldap-ng-manager/t/11-save-changed-conf-with-confirmation.t @@ -54,8 +54,8 @@ ok( ) or print STDERR Dumper($resBody); ok( - @{ $resBody->{details}->{__changes__} } == 22, - 'JSON response contains 24 changes' + @{ $resBody->{details}->{__changes__} } == 23, + 'JSON response contains 23 changes' ) or print STDERR Dumper($resBody); #print STDERR Dumper($resBody); @@ -113,11 +113,10 @@ ok( $res = &client->jsonResponse('/diff/1/2'), 'Diff called' ); my ( @c1, @c2 ); ok( ( @c1 = sort keys %{ $res->[0] } ), 'diff() detects changes in conf 1' ); ok( ( @c2 = sort keys %{ $res->[1] } ), 'diff() detects changes in conf 2' ); -ok( @c1 == 12, '11 keys changed in conf 1' ) +ok( @c1 == 12, '12 keys changed in conf 1' ) or print STDERR "Expect: 12 keys, get: " . join( ', ', @c1 ) . "\n"; -ok( @c2 == 16, '14 keys changed or created in conf 2' ) +ok( @c2 == 16, '16 keys changed or created in conf 2' ) or print STDERR "Expect: 16 keys, get: " . join( ',', @c2 ) . "\n"; - count(5); unlink $confFiles->[1]; @@ -246,6 +245,10 @@ sub changes { 'new' => 0, 'key' => 'captcha_mail_enabled', 'old' => '1' + }, + { + 'confCompacted' => '1', + 'removedKeys' => 'some; keys' } ]; } diff --git a/lemonldap-ng-manager/t/12-save-changed-conf.t b/lemonldap-ng-manager/t/12-save-changed-conf.t index 9813e375c..a08809d8c 100644 --- a/lemonldap-ng-manager/t/12-save-changed-conf.t +++ b/lemonldap-ng-manager/t/12-save-changed-conf.t @@ -38,7 +38,7 @@ foreach my $i ( 0 .. 1 ) { } ok( - @{ $resBody->{details}->{__changes__} } == 22, + @{ $resBody->{details}->{__changes__} } == 23, 'JSON response contains 22 changes' ) or print STDERR Dumper($resBody); @@ -224,6 +224,10 @@ sub changes { { 'key' => 'virtualHosts', 'old' => 'test2.example.com' + }, + { + 'confCompacted' => '1', + 'removedKeys' => 'some; keys' } ]; }