marpaia/chef-golang

Tests test errror on http ops, but not response codes

Closed this issue · 2 comments

We should be testing responses here as well.

I'm not sure if this is what you mean, but every HTTP response in the tests should call the responseBody helper in api.go (https://github.com/marpaia/chef-golang/blob/master/api.go#L493) which verifies that the status code is a 200.

ah excellent. I brought this up cause the server returned an error, but that must have been a 200 response with a error body :| bleh