-
-
Save bielawb/f065ddf2e29a05917f62f864290f4e44 to your computer and use it in GitHub Desktop.
Testowanie zachowania gdy polecenie zwróci błąd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It 'Zwraca błąd z info o problemach w Invoke-RestMethod' { | |
Mock -CommandName Invoke-RestMethod -MockWith { | |
Write-Error 'Błąd!' | |
} | |
{ | |
Get-PowerShellPLPost -ErrorAction Stop | |
} | Should -Throw -ExpectedMessage 'Coś poszło nie tak... Błąd!' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment