Add test for -WhatIf for New-FileCatalog (#8966)

This commit is contained in:
mjanko5
2019-02-27 10:53:08 +05:00
committed by Ilya
parent 11ae24fcad
commit 7e0411fcd9
@@ -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
}
}
}