Skip to content

Commit

Permalink
resolve error when using json encoder, fixes #34
Browse files Browse the repository at this point in the history
remove newline
  • Loading branch information
sjkaliski committed Mar 27, 2018
1 parent d831b87 commit e166536
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 e166536

Please sign in to comment.