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) } } }