Skip to content

Commit 43d50a4

Browse files
committed
Additional validation to check if implementAs
1 parent a3dd6be commit 43d50a4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

powershell-adapter/Tests/win_powershellgroup.tests.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,10 @@ class PSClassResource {
332332
}
333333
}
334334

335-
$resources = dsc -l trace resource list --adapter Microsoft.Windows/WindowsPowerShell | ConvertFrom-Json
335+
$out = dsc -l trace resource list --adapter Microsoft.Windows/WindowsPowerShell | ConvertFrom-Json
336336
$LASTEXITCODE | Should -Be 0
337-
$resources.type | Should -Contain 'PSClassResource/PSClassResource'
337+
$out.type | Should -Contain 'PSClassResource/PSClassResource'
338+
$out | Where-Object -Property type -EQ PSClassResource/PSClassResource | Select-Object -ExpandProperty implementedAs | Should -Be 1 # Class-based
338339
}
339340

340341
It 'Get works with class-based PS DSC resources' -Skip:(!$IsWindows) {

0 commit comments

Comments
 (0)