From 1ecf52b48aebe60434c9e5bdbac68ec95a90e0ec Mon Sep 17 00:00:00 2001 From: OCram85 Date: Wed, 27 Mar 2019 11:08:00 +0100 Subject: [PATCH] add additional certificate store tests --- tests/Store/02_New-CredentialStore.Tests.ps1 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/Store/02_New-CredentialStore.Tests.ps1 b/tests/Store/02_New-CredentialStore.Tests.ps1 index f822940..2d25e24 100644 --- a/tests/Store/02_New-CredentialStore.Tests.ps1 +++ b/tests/Store/02_New-CredentialStore.Tests.ps1 @@ -74,6 +74,20 @@ Describe "New-CredentialStore" { { New-CredentialStore -Path (Join-Path -Path (Get-TempDir) -ChildPath '/dummy.json') -Shared -Confirm:$false} | Should -Throw } } + Context "Tests for Windows certificate store" { + It "Create new private store and skipt certificate linkin" { + { New-CredentialStore -UseCertStore -Force } | Should -Not -Throw + $CS = Get-CredentialStore + $CS.PfxCertificate | Should -Be $null + $CS.Thumbprint | Should -Not -Be $null + } + It "Create new shared store and skipt certificate linkin" { + { New-CredentialStore -Shared -UseCertStore -Force } | Should -Not -Throw + $CS = Get-CredentialStore -Shared + $CS.PfxCertificate | Should -Be $null + $CS.Thumbprint | Should -Not -Be $null + } + } } # Cleanup test stores and restore existing ones.