reg/vendor/github.com/docker/docker-ce/components/engine/daemon/logger/templates/templates_test.go
Jess Frazelle 3834c605e5
update deps
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
2018-03-06 10:32:47 -05:00

18 lines
328 B
Go

package templates
import (
"bytes"
"testing"
"github.com/stretchr/testify/assert"
)
func TestNewParse(t *testing.T) {
tm, err := NewParse("foo", "this is a {{ . }}")
assert.NoError(t, err)
var b bytes.Buffer
assert.NoError(t, tm.Execute(&b, "string"))
want := "this is a string"
assert.Equal(t, want, b.String())
}