mirror of https://github.com/gin-gonic/gin.git
24 lines
505 B
Go
24 lines
505 B
Go
|
// Copyright 2019 Gin Core Team. All rights reserved.
|
||
|
// Use of this source code is governed by a MIT style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
|
package render
|
||
|
|
||
|
import (
|
||
|
"net/http/httptest"
|
||
|
"strings"
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/require"
|
||
|
)
|
||
|
|
||
|
func TestReaderRenderNoHeaders(t *testing.T) {
|
||
|
content := "test"
|
||
|
r := Reader{
|
||
|
ContentLength: int64(len(content)),
|
||
|
Reader: strings.NewReader(content),
|
||
|
}
|
||
|
err := r.Render(httptest.NewRecorder())
|
||
|
require.NoError(t, err)
|
||
|
}
|