adds test for NewCredentialStore output exception
This commit is contained in:
parent
f4bac76d60
commit
52aa4465a2
@ -92,6 +92,12 @@ Describe "New-CredentialStore" {
|
|||||||
{New-CredentialStore -Path $pCS -Shared -Force} | Should Not Throw
|
{New-CredentialStore -Path $pCS -Shared -Force} | Should Not Throw
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Context "Test exception handling" {
|
||||||
|
Mock Out-File {throw "foobar exception"}
|
||||||
|
It "JSON Converstion should fail and throw" {
|
||||||
|
{ New-CredentialStore -Path "C:\dummy.json"} | Should -Throw
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Cleanup test stores and restore existing ones.
|
# Cleanup test stores and restore existing ones.
|
||||||
|
Loading…
Reference in New Issue
Block a user