Skip to content

Commit

Permalink
Update Microsoft365DSC.TeamsUpgradePolicy.Tests.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois committed Nov 24, 2024
1 parent bea8ce0 commit ed71c71
Showing 1 changed file with 0 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,33 +63,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
}
}

Context -Name 'When the policy already exists and is NOT in the Desired State' -Fixture {
BeforeAll {
$testParams = @{
Identity = 'Test Policy'
MigrateMeetingsToTeams = $false
Credential = $Credential
}

Mock -CommandName Get-CsTeamsUpgradePolicy -MockWith {
return @{
Identity = 'Test Policy'
Description = 'This is a configuration drift'
NotifySfBUsers = $false
}
}
}

It 'Should return false from the Test method' {
Test-TargetResource @testParams | Should -Be $false
}

It 'Should update the policy from the Set method' {
Set-TargetResource @testParams
Should -Invoke -CommandName Grant-CsTeamsUpgradePolicy -Exactly 1
}
}

Context -Name 'When the policy already exists and IS in the Desired State' -Fixture {
BeforeAll {
$testParams = @{
Expand Down

0 comments on commit ed71c71

Please sign in to comment.