From f1710ea263067836b5621953f316611b3971933b Mon Sep 17 00:00:00 2001 From: Nik Charlebois Date: Tue, 3 Oct 2023 07:22:41 -0400 Subject: [PATCH] Update Microsoft365DSC.EXOPlace.Tests.ps1 --- .../Microsoft365DSC.EXOPlace.Tests.ps1 | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOPlace.Tests.ps1 b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOPlace.Tests.ps1 index f8ee095c9c..37cd7891ad 100644 --- a/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOPlace.Tests.ps1 +++ b/Tests/Unit/Microsoft365DSC/Microsoft365DSC.EXOPlace.Tests.ps1 @@ -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"; + } } } @@ -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' } } @@ -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' { @@ -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 @( @{