-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stubbed response with only callback returns unexpected status code. #533
Comments
Hello @rudi-brunner, thank you for finding this bug. I'll take a look. |
The issue is that you use an Enum, if you use However, I'll make a fix in the code. |
@rudi-brunner can you try preview version |
Thanks for the quick response :) |
Works like a charm 🥇 |
Describe the bug
When setting up a stubbed response with only a callback I would expect that the status code which I set on the returned
ResponseMessage
would be the status code which the request will receive. But you always getHttpStatusCode.OK
anyway.Expected behavior:
If I only specify
.WithCallback()
and not.WithStatusCode()
I would expect that the status code of the returnedResponseMessage
object is returned.Test to reproduce
This test is currently failing with WireMock.Net 1.3.5
It fails with:
Other related info
I checked in the debugger that the callback was triggered. It was triggered.
The text was updated successfully, but these errors were encountered: