You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the current design of the Pester tests, each of the functions is actually being executed live during the test. For example, running a test against New-HipchatUser will actually create a new user in your HipChat environment. The test will then run Remove-HipchatUser to clean up after itself.
I would like to investigate somehow mocking a properly structured API response from Invoke-WebRequest, to ensure that functions aren't actually making changes to the environment. After all, we want to test the code itself, not the API.
I can't quite figure out how to structure the response correctly.
The text was updated successfully, but these errors were encountered:
#11 Tried to contribute to this open item with the linked PR. I'm super-new to all this, so advanced apologies for things that don't look quite right or inadvertent slips of GitHub etiquette.
I am open to testing anything that you think might be relevant.
FYI, HipChat has been purchased by Slack and will be going away within the next few months, so it might not be worth spending time on this. If you would still like to, please feel free!
Due to the current design of the Pester tests, each of the functions is actually being executed live during the test. For example, running a test against New-HipchatUser will actually create a new user in your HipChat environment. The test will then run Remove-HipchatUser to clean up after itself.
I would like to investigate somehow mocking a properly structured API response from Invoke-WebRequest, to ensure that functions aren't actually making changes to the environment. After all, we want to test the code itself, not the API.
I can't quite figure out how to structure the response correctly.
The text was updated successfully, but these errors were encountered: