From 4ed6265ed7fe762c7eed01931c2b93ab06866930 Mon Sep 17 00:00:00 2001 From: Richard Kuhnt Date: Mon, 25 Jun 2018 13:31:08 +0200 Subject: [PATCH] Add some tests for scoop config --- test/Scoop-Config.Tests.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/Scoop-Config.Tests.ps1 b/test/Scoop-Config.Tests.ps1 index 967aaaddc..ace7718c0 100644 --- a/test/Scoop-Config.Tests.ps1 +++ b/test/Scoop-Config.Tests.ps1 @@ -2,7 +2,7 @@ . "$psscriptroot\..\lib\config.ps1" describe "hashtable" { - $json = '{ "one": 1, "two": [ { "a": "a" }, "b", 2 ], "three": { "four": 4 } }' + $json = '{ "one": 1, "two": [ { "a": "a" }, "b", 2 ], "three": { "four": 4 }, "five": true, "six": false, "seven": "\/Date(1529917395805)\/" }' it "converts pscustomobject to hashtable" { $obj = convertfrom-json $json @@ -13,5 +13,8 @@ describe "hashtable" { $ht.two[1] | should be "b" $ht.two[2] | should beexactly 2 $ht.three.four | should beexactly 4 + $ht.five | should beexactly $true + $ht.six | should beexactly $false + [System.DateTime]::Equals($ht.seven, $(New-Object System.DateTime (2018, 06, 25, 09, 03, 15, 805))) | should be $true } }