forked from microsoft/Microsoft365DSC
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
51 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,9 +53,6 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { | |
Mock -CommandName Get-MigrationUser -MockWith { | ||
} | ||
|
||
Mock -CommandName Get-MigrationUser -MockWith { | ||
} | ||
|
||
# Mock Write-Host to hide output during the tests | ||
Mock -CommandName Write-Host -MockWith { | ||
} | ||
|
@@ -126,7 +123,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { | |
return @{ | ||
AddUsers = $False; | ||
BadItemLimit = "Unlimited"; | ||
CompleteAfter = "07/30/2020 21:00:00"; | ||
CompleteAfter = "07/30/2020 9:00:00 PM"; | ||
Credential = $Credscredential; | ||
Ensure = "Present"; | ||
Identity = "Arpita"; | ||
|
@@ -136,18 +133,28 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { | |
NotificationEmails = @("[email protected]","[email protected]"); | ||
SkipMerging = @("abc"); | ||
SourceEndpoint = @{Identity = @{Id = "gmailCalendar"}}; | ||
StartAfter = "07/30/2020 21:00:00"; | ||
StartAfter = "07/30/2020 9:00:00 PM"; | ||
Status = @{Value = "Completing"}; | ||
TargetDeliveryDomain = "O365InsightsView.mail.onmicrosoft.com"; | ||
Update = $False; | ||
} | ||
} | ||
Mock -CommandName Get-MigrationUser -MockWith { | ||
return @( | ||
@{ | ||
Identity = "[email protected]" | ||
}, | ||
@{ | ||
Identity = "[email protected]" | ||
} | ||
) | ||
} | ||
} | ||
It 'Should return Values from the Get method' { | ||
(Get-TargetResource @testParams).Ensure | Should -Be 'Present' | ||
} | ||
It 'Should return false from the Test method' { | ||
Test-TargetResource @testParams | Should -Be $false | ||
Test-TargetResource @testParams -Verbose | Should -Be $false | ||
} | ||
|
||
It 'Should remove the instance from the Set method' { | ||
|
@@ -197,6 +204,16 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { | |
Update = $False; | ||
} | ||
} | ||
Mock -CommandName Get-MigrationUser -MockWith { | ||
return @( | ||
@{ | ||
Identity = "[email protected]" | ||
}, | ||
@{ | ||
Identity = "[email protected]" | ||
} | ||
) | ||
} | ||
} | ||
It 'Should return Values from the Get method' { | ||
(Get-TargetResource @testParams).Ensure | Should -Be 'Present' | ||
|
@@ -266,7 +283,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture { | |
|
||
|
||
It 'Should return true from the Test method' { | ||
Test-TargetResource @testParams -Verbose | Should -Be $true | ||
Test-TargetResource @testParams | Should -Be $true | ||
} | ||
} | ||
|
||
|