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

Make it possible to use an httptest.ResponseRecorder where a restful.Response is expected #38

Closed
eggpi opened this issue Aug 1, 2013 · 2 comments

Comments

@eggpi
Copy link

eggpi commented Aug 1, 2013

It seems to be already possible to mock a restful.Request since it simply wraps a http.Request, which in turn can be hand-crafted while testing. However, it doesn't seem to be possible to wrap a httptest.ResponseRecording in a restful.Response in order to examine what my handlers have done to it.

@emicklei
Copy link
Owner

emicklei commented Aug 1, 2013

To the examples, I added a file that shows how to test your handler using a httptest.ResponseRecorder

@emicklei emicklei closed this as completed Aug 1, 2013
@eggpi
Copy link
Author

eggpi commented Aug 1, 2013

Thank you very much! :)

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

No branches or pull requests

2 participants