Skip to content
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

bug: fix supporting the Patch method and logging the body #67

Merged
merged 3 commits into from
Nov 20, 2017

Conversation

alastairtree
Copy link
Collaborator

If you need to mock an API designed to the JsonAPI specification you need to work with PATCH requests with a http body. This fix and tests should allow support of PATCH with body and ensure the correct information gets logged.

  • Patch requests not configured to support Body
  • Add a unit test covering a patch request and logging of results

- Patch not configured to support Body
- Add a unit test
@codecov
Copy link

codecov bot commented Nov 20, 2017

Codecov Report

Merging #67 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #67   +/-   ##
=======================================
  Coverage   52.81%   52.81%           
=======================================
  Files          66       66           
  Lines        2378     2378           
  Branches      329      329           
=======================================
  Hits         1256     1256           
  Misses        980      980           
  Partials      142      142
Impacted Files Coverage Δ
src/WireMock.Net/Owin/OwinRequestMapper.cs 97.43% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2083037...658289e. Read the comment docs.

@@ -91,8 +91,9 @@ private bool ParseBody(string method)
TRACE - Body not supported.
OPTIONS - Body supported but no semantics on usage (maybe in the future).
CONNECT - No defined body semantics
PATHC - Body suported
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PATCH

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Fixed

@StefH StefH merged commit 7986031 into WireMock-Net:master Nov 20, 2017
@alastairtree
Copy link
Collaborator Author

alastairtree commented Nov 23, 2017

Not sure but don't think this has been released? Could it be please?

@alastairtree alastairtree deleted the feat/support-patch branch November 23, 2017 13:01
@StefH
Copy link
Collaborator

StefH commented Nov 23, 2017

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants