Fix tests taht use old pester syntax
This commit is contained in:
@@ -54,7 +54,7 @@ Describe "Connect-SsoAdminServer and Disconnect-SsoAdminServer Tests" {
|
|||||||
-Password ($Password + "invalid") `
|
-Password ($Password + "invalid") `
|
||||||
-SkipCertificateCheck `
|
-SkipCertificateCheck `
|
||||||
-ErrorAction Stop } | `
|
-ErrorAction Stop } | `
|
||||||
Should Throw "Invalid credentials"
|
Should -Throw "Invalid credentials"
|
||||||
}
|
}
|
||||||
|
|
||||||
It 'Connect-SsoAdminServer throws error on invalid Tls Certificate' {
|
It 'Connect-SsoAdminServer throws error on invalid Tls Certificate' {
|
||||||
@@ -65,7 +65,7 @@ Describe "Connect-SsoAdminServer and Disconnect-SsoAdminServer Tests" {
|
|||||||
-User $User `
|
-User $User `
|
||||||
-Password $Password `
|
-Password $Password `
|
||||||
-ErrorAction Stop } | `
|
-ErrorAction Stop } | `
|
||||||
Should Throw "The SSL connection could not be established, see inner exception."
|
Should -Throw "The SSL connection could not be established, see inner exception."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ Describe "Connect-SsoAdminServer and Disconnect-SsoAdminServer Tests" {
|
|||||||
|
|
||||||
# Act
|
# Act
|
||||||
{ Disconnect-SsoAdminServer -Server $expected } | `
|
{ Disconnect-SsoAdminServer -Server $expected } | `
|
||||||
Should Not Throw
|
Should -Not -Throw
|
||||||
|
|
||||||
# Assert
|
# Assert
|
||||||
$global:DefaultSsoAdminServers | Should -Not -Contain $expected
|
$global:DefaultSsoAdminServers | Should -Not -Contain $expected
|
||||||
|
|||||||
Reference in New Issue
Block a user