diff --git a/test/powershell/Modules/Microsoft.PowerShell.Security/FileCatalog.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Security/FileCatalog.Tests.ps1 index c3fe1c4d344..173c3851c66 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Security/FileCatalog.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Security/FileCatalog.Tests.ps1 @@ -409,6 +409,12 @@ Describe "Test suite for NewFileCatalogAndTestFileCatalogCmdlets" -Tags "CI" { $result = Test-FileCatalog -Path $testDataPath\UserConfigProv\ -CatalogFilePath $script:catalogPath -FilesToSkip "*.psd1","UserConfigProviderModVersion2.psm1","*ModVersion1.schema.mof" $result | Should -Be "Valid" } + + It "New-FileCatalog -WhatIf does not create file" { + $catalogPath = Join-Path "TestDrive:" "TestCatalogWhatIfForNewFileCatalog.cat" + New-FileCatalog -CatalogFilePath $catalogPath -WhatIf + $catalogPath | Should -Not -Exist + } } }