Skip to content

Commit

Permalink
fix tests, remove/add cmdlet's mock
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrola committed Apr 24, 2024
1 parent bcf9280 commit b9cd911
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/Unit/Microsoft365DSC/Microsoft365DSC.AADGroup.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Mock -CommandName Remove-MgGroupMemberDirectoryObjectByRef -MockWith {
}

Mock -CommandName Remove-MgBetaDirectoryRoleMemberByRef -MockWith {
Mock -CommandName Remove-MgBetaDirectoryRoleMemberDirectoryObjectByRef -MockWith {
}

# Mock Write-Host to hide output during the tests
Expand Down Expand Up @@ -564,7 +564,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
Set-TargetResource @testParams
Should -Invoke -CommandName 'Get-MgGroup' -Exactly 1
Should -Invoke -CommandName 'Get-MgBetaDirectoryRole' -Exactly 1
Should -Invoke -CommandName 'Remove-MgBetaDirectoryRoleMemberByRef' -Exactly 1
Should -Invoke -CommandName 'Remove-MgBetaDirectoryRoleMemberDirectoryObjectByRef' -Exactly 1
}
}

Expand Down

0 comments on commit b9cd911

Please sign in to comment.