fix var scoping in pester test

This commit is contained in:
OCram85 2018-03-21 12:06:59 +01:00
parent 0417ecd9f6
commit 811a83b4bc

View File

@ -88,9 +88,9 @@ Describe "New-CredentialStoreItem" {
}
Context "General Exception handling" {
Mock Test-CredentialStore {return $false}
$UserName = 'myUser'
$Password = ConvertTo-SecureString -String "mypasswd" -AsPlainText -Force
Mock Get-Credential {
$UserName = 'myUser'
$Password = ConvertTo-SecureString -String "mypasswd" -AsPlainText -Force
return [PSCredential]::new($UserName, $Password)
}