1
0
mirror of https://github.com/labstack/echo.git synced 2026-03-14 15:52:33 +02:00
Files
echo/echotest/reader_test.go
toimtoimtoim f071367e3c V5 changes
2026-01-18 18:14:41 +02:00

22 lines
429 B
Go

package echotest
import (
"testing"
"github.com/stretchr/testify/assert"
)
const testJSONContent = `{
"field": "value"
}`
func TestLoadBytesOK(t *testing.T) {
data := LoadBytes(t, "testdata/test.json")
assert.Equal(t, []byte(testJSONContent+"\n"), data)
}
func TestLoadBytesOK_TrimNewlineEnd(t *testing.T) {
data := LoadBytes(t, "testdata/test.json", TrimNewlineEnd)
assert.Equal(t, []byte(testJSONContent), data)
}