Use HOME instead of HOSTNAME for environment tests
Because HOSTNAME can be tricky, but HOME is always set.
This commit is contained in:
parent
6b7262a0d8
commit
7cda20517e
|
@ -11,9 +11,13 @@
|
|||
$ENV:PATH | Should Match "/bin"
|
||||
}
|
||||
|
||||
It "Should have the correct HOME" {
|
||||
$expected = /bin/bash -c "cd ~ && pwd"
|
||||
$ENV:HOME | Should Be $expected
|
||||
}
|
||||
|
||||
It "Should be able to access the members of the environment variable" {
|
||||
$expected = /bin/bash -c "cd ~ && pwd"
|
||||
|
||||
(Get-Item ENV:HOME).Value | Should Be $expected
|
||||
}
|
||||
|
||||
|
@ -25,10 +29,4 @@
|
|||
$ENV:TESTENVIRONMENTVARIABLE | Should Be $expected
|
||||
|
||||
}
|
||||
|
||||
It "Should have the correct HOSTNAME" {
|
||||
$expected = /bin/hostname
|
||||
|
||||
$ENV:HOSTNAME | Should Be $expected
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
}
|
||||
|
||||
It "Should return true if used on components other than filesystem objects" {
|
||||
Test-Path Alias:\gci | Should Be $true
|
||||
Test-Path Env:\HOSTNAME | Should Be $true
|
||||
Test-Path Alias:\gci | Should Be $true
|
||||
Test-Path Env:\HOME | Should Be $true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue