Add unit test when service is not an array (#2673)

This commit is contained in:
Clément OUDOT 2022-01-24 19:58:42 +01:00
parent 8c998fe0a2
commit b1bc592f00
2 changed files with 4 additions and 1 deletions

View File

@ -313,7 +313,6 @@ sub _isNewCasAppServiceUrlUnique {
unless ( ref $casApp->{options}->{service} eq "ARRAY" ) {
return {
res => 'ko',
code => 400,
msg => "The parameter 'service' must be an array",
};
}

View File

@ -717,6 +717,10 @@ delete $casApp->{options}->{playingPossum};
$casApp->{options}->{service} = [ "XXX" ];
checkReplaceWithInvalidAttribute( $test, 'cas/app', 'myCasApp2', $casApp );
$test = "CasApp - Replace should fail if service is not an array";
$casApp->{options}->{service} = "http://cas.url.string";
check409( $test, update( $test, 'cas/app', 'myCasApp2', $casApp ) );
$test = "CasApp - Replace should fail if confKey not found";
$casApp->{confKey} = 'myCasApp3';
checkReplaceNotFound( $test, 'cas/app', 'myCasApp3', $casApp );