Skip to content

Commit

Permalink
Merge pull request #35 from beme/sjkaliski-json-encoding-fix
Browse files Browse the repository at this point in the history
resolve error when using json encoder, fixes #34
  • Loading branch information
sjkaliski authored Mar 27, 2018
2 parents d831b87 + e166536 commit de1ebf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func AssertHTTPResponse(t *testing.T, id string, w *http.Response) {

// If the response body is JSON, indent.
if contentTypeIsJSON(contentType) {
lines := strings.Split(data, "\n")
lines := strings.Split(strings.TrimSpace(data), "\n")
jsonStr := lines[len(lines)-1]

var jsonIface map[string]interface{}
Expand Down

0 comments on commit de1ebf8

Please sign in to comment.