From 3e8884a7f1ddd492f127fd8cc7607a536809d9b6 Mon Sep 17 00:00:00 2001 From: Javier Provecho Fernandez Date: Fri, 25 Sep 2015 12:12:34 +0200 Subject: [PATCH] Fix MiddlewareWrite in middleware_test.go --- middleware_test.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/middleware_test.go b/middleware_test.go index 61d27c9e..3101d523 100644 --- a/middleware_test.go +++ b/middleware_test.go @@ -6,6 +6,7 @@ package gin import ( "errors" + "strings" "testing" @@ -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 -bar{"foo":"bar"} -{"foo":"bar"} -event:test -data:message - -`) + assert.Equal(t, strings.Replace(w.Body.String(), " ", "", -1), strings.Replace("hola\nbar{\"foo\":\"bar\"}\n{\"foo\":\"bar\"}\nevent:test\ndata:message\n\n", " ", "", -1)) }