From 9956ac764453e942b55b8fd2603a11dec62b520e Mon Sep 17 00:00:00 2001 From: Grant Archibald Date: Wed, 5 May 2021 20:59:51 -0700 Subject: [PATCH] Test updates --- scripts/config.psm1 | 2 +- tests/components/keyvault.tests.ps1 | 2 +- tests/config.tests.ps1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/config.psm1 b/scripts/config.psm1 index abb9011..3e13b99 100644 --- a/scripts/config.psm1 +++ b/scripts/config.psm1 @@ -120,7 +120,7 @@ class Config { $property.SetValue($config, $stringArray, $NULL) } "System.Boolean" { - $out = $NULL + $out = $False if ([bool]::TryParse($rawValue, [ref]$out)) { $property.SetValue($config, $out, $NULL) } diff --git a/tests/components/keyvault.tests.ps1 b/tests/components/keyvault.tests.ps1 index 0c1413e..98f163e 100644 --- a/tests/components/keyvault.tests.ps1 +++ b/tests/components/keyvault.tests.ps1 @@ -101,7 +101,7 @@ Describe "KeyVault Tests" { # Arrange $config = [Config]::new().LoadJson("") $kv = [KeyVault]::new($config) - $resources = ("[{'type':'Microsoft.KeyVault/vaults', 'name':'kv'}]" | ConvertFrom-Json) + [Object[]] $resources = ("[{'type':'Microsoft.KeyVault/vaults', 'name':'kv'}]" | ConvertFrom-Json) $commands = New-Object System.Collections.Generic.List[System.String] Mock az { diff --git a/tests/config.tests.ps1 b/tests/config.tests.ps1 index 7afa09e..ceae3ed 100644 --- a/tests/config.tests.ps1 +++ b/tests/config.tests.ps1 @@ -57,7 +57,7 @@ Describe "Config Tests" { } It "Set loadFromKeyVault False" { - $config = [Config]::new().LoadJson("{'loadFromKeyVault':false}") + $config = [Config]::new().LoadJson("{'loadFromKeyVault':'false'}") $config.loadFromKeyVault | Should -Be $FALSE }