-
- Downloads
More comprehensive tests for HTTP verb endpoints (#88)
We were not explicitly testing the behavior of some HTTP verb endpoints like /put and /patch, because they currently share an underlying handler with /post which is thoroughly tested. The addition of the /anything endpoint in #83 made me realize a bit more explicit test coverage would be good, so here we're landing a bit of a refactoring of the test suite to generate tests for all of those endpoints. Along the way, we also improve compatibility with the original httpbin implementation by tricking the stdlib net/http machinery into parsing request bodies for DELETE requests.
Showing
- httpbin/digest/digest.go 13 additions, 13 deletionshttpbin/digest/digest.go
- httpbin/handlers.go 12 additions, 2 deletionshttpbin/handlers.go
- httpbin/handlers_test.go 152 additions, 72 deletionshttpbin/handlers_test.go
- httpbin/helpers.go 7 additions, 0 deletionshttpbin/helpers.go
- httpbin/httpbin.go 8 additions, 5 deletionshttpbin/httpbin.go
Loading
Please register or sign in to comment