Add unit test when service is not an array (#2673)
This commit is contained in:
parent
8c998fe0a2
commit
b1bc592f00
|
@ -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",
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue
Block a user