Skip to content

Commit 2beb660

Browse files
committed
fix test
1 parent 6195657 commit 2beb660

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

registry/tests/registry.config.whatif.tests.ps1

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ Describe 'registry config whatif tests' {
1616
"keyPath": "HKCU\\1\\2\\3"
1717
}
1818
'@
19+
registry config set -w --input $json | Write-Host
1920
$get_before = registry config get --input $json
2021
$result = registry config set -w --input $json | ConvertFrom-Json
2122
$LASTEXITCODE | Should -Be 0
2223
$result.keyPath | Should -Be 'HKCU\1\2\3'
23-
$result.metadata.whatIf[0] | Should -Match '.*1.*'
24-
$result.metadata.whatIf[1] | Should -Match '.*2.*'
25-
$result.metadata.whatIf[2] | Should -Match '.*3.*'
24+
$result._metadata.whatIf[0] | Should -Match '.*1.*'
25+
$result._metadata.whatIf[1] | Should -Match '.*2.*'
26+
$result._metadata.whatIf[2] | Should -Match '.*3.*'
2627
$get_after = registry config get --input $json
2728
$get_before | Should -EQ $get_after
2829
}
@@ -42,9 +43,9 @@ Describe 'registry config whatif tests' {
4243
$result.keyPath | Should -Be 'HKCU\1\2\3'
4344
$result.valueName | Should -Be 'Hello'
4445
$result.valueData.String | Should -Be 'World'
45-
$result.metadata.whatIf[0] | Should -Match '.*1.*'
46-
$result.metadata.whatIf[1] | Should -Match '.*2.*'
47-
$result.metadata.whatIf[2] | Should -Match '.*3.*'
46+
$result._metadata.whatIf[0] | Should -Match '.*1.*'
47+
$result._metadata.whatIf[1] | Should -Match '.*2.*'
48+
$result._metadata.whatIf[2] | Should -Match '.*3.*'
4849
}
4950

5051
It 'Can whatif an existing key with new value' -Skip:(!$IsWindows) {

0 commit comments

Comments
 (0)