From 700208a44b16dcbc686a470ca4ac51f10e875e17 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Mon, 12 Mar 2018 16:03:32 +0100 Subject: [PATCH] update pester tests --- tests/ChallengeFile/01_Set-ChallengeFile.Tests.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/ChallengeFile/01_Set-ChallengeFile.Tests.ps1 b/tests/ChallengeFile/01_Set-ChallengeFile.Tests.ps1 index 71f7c9c..2de7e8c 100644 --- a/tests/ChallengeFile/01_Set-ChallengeFile.Tests.ps1 +++ b/tests/ChallengeFile/01_Set-ChallengeFile.Tests.ps1 @@ -25,10 +25,12 @@ Describe "Set-ChallengeFile" { if (Test-Path -Path ("{0}\PSCredentialStore\Challenge.bin" -f $env:ProgramData)) { Remove-Item -Path ("{0}\PSCredentialStore\Challenge.bin" -f $env:ProgramData) } - Set-ChallengeFile | Should -Be $true + Set-ChallengeFile + Test-Path -Path ("{0}\PSCredentialStore\Challenge.bin" -f $env:ProgramData) | Should -Be $true } It "Existing Credential file should return error" { { Set-ChallengeFile } | Should -Throw + Remove-Item -Path ("{0}\PSCredentialStore\Challenge.bin" -f $env:ProgramData) } } }