Skip to content

Commit de1ebf8

Browse files
authored
Merge pull request #35 from beme/sjkaliski-json-encoding-fix
resolve error when using json encoder, fixes #34
2 parents d831b87 + e166536 commit de1ebf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

assert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func AssertHTTPResponse(t *testing.T, id string, w *http.Response) {
4343

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

4949
var jsonIface map[string]interface{}

0 commit comments

Comments
 (0)