From b9cd91113e1b6f66bba06dfd514a8418c2265fa9 Mon Sep 17 00:00:00 2001 From: Sandro Lanfranchi Date: Wed, 24 Apr 2024 14:13:43 +0200 Subject: [PATCH] fix tests, remove/add cmdlet's mock --- Tests/Unit/Microsoft365DSC/Microsoft365DSC.AADGroup.Tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.AADGroup.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.AADGroup.Tests.ps1 index db68fc490f..24444cf200 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.AADGroup.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.AADGroup.Tests.ps1 @@ -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 @@ -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 } }