1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/logger/templates/templates_test.go
Daniel Nephin 6be0f70983 Automated migration using
gty-migrate-from-testify --ignore-build-tags

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-03-16 11:03:43 -04:00

19 lines
466 B
Go

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