Skip to content

Commit

Permalink
Update Microsoft365DSC.EXOPlace.Tests.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
NikCharlebois committed Oct 3, 2023
1 parent a67c254 commit f1710ea
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOPlace.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,19 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
}

Mock -CommandName Get-Place -MockWith {
return @(
@{
AudioDeviceName = "MyAudioDevice";
Capacity = 10;
City = "";
DisplayDeviceName = "DisplayDeviceName";
Identity = "MyRoom@$contoso.com";
IsWheelChairAccessible = $True;
MTREnabled = $False;
ParentType = "None";
Phone = "555-555-5555";
Tags = @("Tag1", "Tag2");
VideoDeviceName = "VideoDevice";
}
)
return @{
AudioDeviceName = "MyAudioDevice";
Capacity = 10;
City = "";
DisplayDeviceName = "DisplayDeviceName";
Identity = "MyRoom@$contoso.com";
IsWheelChairAccessible = $True;
MTREnabled = $False;
ParentType = "None";
Phone = "555-555-5555";
Tags = @("Tag1", "Tag2");
VideoDeviceName = "VideoDevice";
}
}
}

Expand All @@ -82,7 +80,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
}

It 'Should not update anything in the Set Method' {
(Get-TargetResource @testParams).Presence | Should -Be 'Present'
(Get-TargetResource @testParams).Ensure | Should -Be 'Present'
}
}

Expand Down Expand Up @@ -128,7 +126,7 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {
}

It 'Should not update anything in the Set Method' {
(Get-TargetResource @testParams).Presence | Should -Be 'Present'
(Get-TargetResource @testParams).Ensure | Should -Be 'Present'
}

It 'Should update the instance from the Set method' {
Expand All @@ -139,10 +137,11 @@ Describe -Name $Global:DscHelper.DescribeHeader -Fixture {

Context -Name 'ReverseDSC Tests' -Fixture {
BeforeAll {
$Global:CurrentModeIsExport = $true
$Global:PartialExportFileName = "$(New-Guid).partial.ps1"
$testParams = @{
Credential = $Credential
}

Mock -CommandName Get-Place -MockWith {
return @(
@{
Expand Down

0 comments on commit f1710ea

Please sign in to comment.