Files
Scoop/test/Scoop-Config.Tests.ps1
T
Simon Hartcher 47544c9e77 Add Pester tests for Config and Versions
Add Scoop-Config.Tests
Add Scoop-Versions.Tests
Remove old tests
2015-04-12 12:10:06 +10:00

17 lines
495 B
PowerShell

. "$psscriptroot\..\lib\core.ps1"
. "$psscriptroot\..\lib\config.ps1"
describe "hashtable" {
$json = '{ "one": 1, "two": [ { "a": "a" }, "b", 2 ], "three": { "four": 4 } }'
it "converts pscustomobject to hashtable" {
$obj = convertfrom-json $json
$ht = hashtable $obj
$ht.one | should beexactly 1
$ht.two[0].a | should be "a"
$ht.two[1] | should be "b"
$ht.two[2] | should beexactly 2
$ht.three.four | should beexactly 4
}
}