adds test for NewCredentialStore output exception

This commit is contained in:
OCram85 2018-03-14 09:19:15 +01:00
parent f4bac76d60
commit 52aa4465a2
1 changed files with 6 additions and 0 deletions

View File

@ -92,6 +92,12 @@ Describe "New-CredentialStore" {
{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.