Skip to content

Commit

Permalink
Update SharePointDsc.SPFarm.Tests.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvand committed Apr 21, 2023
1 parent e2a7878 commit 9d17ae8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/Unit/SharePointDsc/SharePointDsc.SPFarm.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ try
InModuleScope -ModuleName $script:DSCResourceFullName -ScriptBlock {
Describe -Name $Global:SPDscHelper.DescribeHeader -Fixture {
BeforeAll {
Invoke-Command -Scriptblock $Global:SPDscHelper.InitializeScript -NoNewScope
Invoke-Command -ScriptBlock $Global:SPDscHelper.InitializeScript -NoNewScope

# Initialize tests
$mockPassword = ConvertTo-SecureString -String 'password' -AsPlainText -Force
Expand Down Expand Up @@ -109,7 +109,6 @@ try
}
return $returnVal
}
Mock -CommandName Update-SPFlightsConfigFile -MockWith { }
Mock -CommandName Get-SPDscRegistryKey -MockWith {
if ($Value -eq "Location")
{
Expand All @@ -130,6 +129,11 @@ try
return $true
}
}
if ($Global:SPDscHelper.CurrentStubBuildNumber.Major -eq 16 -and
$Global:SPDscHelper.CurrentStubBuildNumber.Build -gt 13000)
{
Mock -CommandName Update-SPFlightsConfigFile -MockWith { }
}

function Add-SPDscEvent
{
Expand Down

0 comments on commit 9d17ae8

Please sign in to comment.