mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-09-27 07:46:27 +00:00
Add some tests for scoop config
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user