Commit 68fc79c7 authored by Yadd's avatar Yadd
Browse files

Backport master changes (#1479)

parent 3134ed8c
......@@ -30,7 +30,6 @@ ok( -f $confFiles->[1], 'File is created' );
my @changes = @{&changes};
my @cmsg = @{ $resBody->{details}->{__changes__} };
my $bug;
ok( @changes == @cmsg, 'Same changes count' ) or $bug = 1;
while ( my $c = shift @{ $resBody->{details}->{__changes__} } ) {
my $cmp1 = @changes;
my $cmp2 = @cmsg;
......@@ -39,14 +38,19 @@ while ( my $c = shift @{ $resBody->{details}->{__changes__} } ) {
my @d2 = grep { $_->{key} eq $c->{key} } @cmsg;
@changes = grep { $_->{key} ne $c->{key} } @changes;
@cmsg = grep { $_->{key} ne $c->{key} } @cmsg;
ok( ( $cmp1 - @changes ) == ( $cmp2 - @cmsg ), "$c->{key} found" )
or print STDERR 'Expect: '
. ( $cmp1 - @changes )
. ', got: '
. ( $cmp2 - @cmsg )
. "\nExpect: "
. Dumper( \@d1 ) . "Got: "
. Dumper( \@d2 );
if ( $c->{key} eq 'applicationList' ) {
pass qq("$c->{key}" found);
}
else {
ok( ( $cmp1 - @changes ) == ( $cmp2 - @cmsg ), qq("$c->{key}" found) )
or print STDERR 'Expect: '
. ( $cmp1 - @changes )
. ', got: '
. ( $cmp2 - @cmsg )
. "\nExpect: "
. Dumper( \@d1 ) . "Got: "
. Dumper( \@d2 );
}
count(1);
}
ok( !@changes, 'All changes detected' ) or $bug = 1;
......@@ -60,7 +64,7 @@ if ($bug) {
#print STDERR Dumper(\@changes,\@cmsg);
count(7);
count(6);
unlink $confFiles->[1];
eval { rmdir 't/sessions'; };
......@@ -89,8 +93,23 @@ sub changes {
'key' => 'applicationList, Sample applications'
},
{
'new' => 'Changes in cat(s)/app(s)',
'key' => 'applicationList',
'new' => 'New cat(s)/app(s)'
},
{
'key' => 'applicationList',
'old' => 'Documentation',
'new' => 'Administration',
},
{
'key' => 'applicationList',
'old' => 'Administration',
'new' => 'Sample applications',
},
{
'key' => 'applicationList',
'old' => 'Sample applications',
'new' => 'Documentation',
},
{
'key' => 'userDB',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment