add Test-Credentialstore tests

This commit is contained in:
OCram85 2018-03-13 14:54:59 +01:00
parent f33a243191
commit 610bed55e1
2 changed files with 10 additions and 1 deletions

View File

@ -20,7 +20,7 @@ image: Visual Studio 2017
install:
- ps: Import-Module .\tools\AppVeyor.psm1
- ps: Invoke-InstallDependencies -Verbose
- ps: Invoke-InstallDependencies
environment:
NuGetToken:

View File

@ -36,5 +36,14 @@ Describe "Test-CredentialStore" {
$res | Should Be $False
$WarningPreference = $oWarningPreference
}
It "Test4: Not existing path should return false" {
Test-CredentialStore -Path 'C:\foobar\CredentialStore.json' | Should -Be $false
}
It "Test5: testing private CredentialStore path" {
if (Test-Path -Path ("{0}\CredentialStore.json" -f $env:APPDATA) ) {
Remove-Item -Path ("{0}\CredentialStore.json" -f $env:APPDATA)
}
Test-CredentialStore | Should -Be $false
}
}
}