Skip to content

Commit

Permalink
Fix MiddlewareWrite in middleware_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
javierprovecho committed Sep 25, 2015
1 parent 8553030 commit 3e8884a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package gin

import (
"errors"
"strings"

"testing"

Expand Down Expand Up @@ -245,11 +246,5 @@ func TestMiddlewareWrite(t *testing.T) {
w := performRequest(router, "GET", "/")

assert.Equal(t, w.Code, 400)
assert.Equal(t, w.Body.String(), `hola
<map><foo>bar</foo></map>{"foo":"bar"}
{"foo":"bar"}
event:test
data:message
`)
assert.Equal(t, strings.Replace(w.Body.String(), " ", "", -1), strings.Replace("hola\n<map><foo>bar</foo></map>{\"foo\":\"bar\"}\n{\"foo\":\"bar\"}\nevent:test\ndata:message\n\n", " ", "", -1))
}

0 comments on commit 3e8884a

Please sign in to comment.