mirror of
https://github.com/labstack/echo.git
synced 2026-03-14 15:52:33 +02:00
22 lines
429 B
Go
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)
|
|
}
|