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

18 lines
389 B
Go

package templates // import "github.com/docker/docker/daemon/logger/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())
}