blob: 5e71d96f26267a2637e37d52d4cda8e36c2a0ceb [file] [log] [blame]
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())
}