Fix TestContextRenderSSE-2 in context_test.go

This commit is contained in:
Javier Provecho Fernandez 2015-09-25 11:43:07 +02:00
parent 704d690ac0
commit aa934766b4
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ package gin
import ( import (
"bytes" "bytes"
"errors" "errors"
"fmt"
"html/template" "html/template"
"mime/multipart" "mime/multipart"
"net/http" "net/http"
@ -351,7 +352,7 @@ func TestContextRenderSSE(t *testing.T) {
"bar": "foo", "bar": "foo",
}) })
assert.Equal(t, w.Body.String(), "event:float\ndata:1.5\n\nid:123\ndata:text\n\nevent:chat\ndata:{\"bar\":\"foo\",\"foo\":\"bar\"}\n\n") assert.Equal(t, fmt.Sprintf("%v", w.Body), "event:float\ndata:1.5\n\nid:123\ndata:text\n\nevent:chat\ndata:{\"bar\":\"foo\",\"foo\":\"bar\"}\n\n")
} }
func TestContextRenderFile(t *testing.T) { func TestContextRenderFile(t *testing.T) {