Skip to content

Commit 05ff695

Browse files
committed
Additional fix for Mock setup of Set-TargetResource unit test
1 parent f484a4d commit 05ff695

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Tests/Unit/MSFT_xComputer.Tests.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ try
284284
{Set-TargetResource -Name "ThisIsBad<>"} | Should Throw
285285
}
286286
It 'Changes computer description'{
287+
Mock Get-ComputerDomain {''}
287288
Mock Get-WMIObject {[PSCustomObject]@{Domain = 'Contoso';Workgroup='Contoso';PartOfDomain=$false}}
288289
Set-TargetResource -Name $env:COMPUTERNAME -Description = 'This is my computer'
289290
Assert-MockCalled -CommandName Set-CimInstance -Exactly 1 -Scope It

0 commit comments

Comments
 (0)