Files
PowerShell/test/powershell/Modules/Microsoft.PowerShell.Management/Pop-Location.Tests.ps1
T
James Truher 9e225ccae2 changes tags for tests
Start using tags CI, Feature, Scenario
2016-07-27 12:06:51 -07:00

29 lines
546 B
PowerShell

Describe "Pop-Location" -Tags "CI" {
$startDirectory = $(Get-Location).Path
BeforeEach { Set-Location $startDirectory }
It "Should be able to be called without error" {
{ Pop-Location } | Should Not Throw
}
It "Should not take a parameter" {
{ Pop-Location .. } | Should Throw
}
It "Should be able pop multiple times" {
Push-Location ..
Push-Location ..
Push-Location ..
Pop-Location
Pop-Location
Pop-Location
$(Get-Location).Path | Should Be $startDirectory
}
Set-Location $startDirectory
}