Improve unit test (#1717)

environments/ppa-mbqj77/deployments/751^2
Christophe Maudoux 6 years ago
parent 3015faef0e
commit a3d66a22b1
  1. 14
      lemonldap-ng-manager/t/12-save-changed-conf.t
  2. 10
      lemonldap-ng-manager/t/jsonfiles/12-modified.json

@ -38,8 +38,8 @@ foreach my $i ( 0 .. 1 ) {
}
ok(
@{ $resBody->{details}->{__changes__} } == 20,
'JSON response contains 20 changes'
@{ $resBody->{details}->{__changes__} } == 22,
'JSON response contains 22 changes'
) or print STDERR Dumper($resBody);
#print STDERR Dumper($resBody);
@ -193,6 +193,16 @@ sub changes {
'old' => undef,
'new' => '$uid'
},
{
'key' => 'exportedHeaders, test3.example.com, cipherId',
'old' => undef,
'new' => 'encrypt($uid)'
},
{
'key' => 'exportedHeaders, test3.example.com, encodeId',
'old' => undef,
'new' => 'encode_base64($uid)'
},
{
'new' => 'test3.example.com',
'key' => 'exportedHeaders'

@ -1870,6 +1870,16 @@
"type": "keyText",
"title": "Auth-User",
"data": "$uid"
},{
"id": "virtualHosts/test2.example.com/exportedHeaders/2",
"type": "keyText",
"title": "cipherId",
"data": "encrypt($uid)"
},{
"id": "virtualHosts/test2.example.com/exportedHeaders/3",
"type": "keyText",
"title": "encodeId",
"data": "encode_base64($uid)"
}]
}, {
"id": "virtualHosts/test2.example.com/post",

Loading…
Cancel
Save