Fix use of Start-Process http://bing.com (#9793)

This commit is contained in:
Steve Lee
2019-06-04 14:36:12 -07:00
committed by Travis Plunk
parent f222a686c5
commit b4e2423fab
2 changed files with 70 additions and 4 deletions
@@ -207,8 +207,12 @@ Describe "Command Discovery tests" -Tags "CI" {
}
Context "error cases" {
It 'Get-Command "less `"-PsPage %db?B of %DoesNotExist:`"" should throw Drive not found' {
{Get-Command -Name "less `"-PsPage %db?B of %DoesNotExist:`""} | Should -Throw -ErrorId 'DriveNotFound' -Because "The drive 'DoesNotExist:' should not exist"
It 'Get-Command "less `"-PsPage %db?B of %DoesNotExist:`"" should return nothing' {
Get-Command -Name "less `"-PsPage %db?B of %DoesNotExist:`"" | Should -BeNullOrEmpty
}
It "Should return command not found for commands in the global scope" {
{Get-Command -Name 'global:help' -ErrorAction Stop} | Should -Throw -ErrorId 'CommandNotFoundException'
}
}
}