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
Vincent Demeester 9ef3b53597
Move pkg/templates away
- Remove unused function and variables from the package
- Remove usage of it from `profiles/apparmor` where it wasn't required
- Move the package to `daemon/logger/templates` where it's only used

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-08-08 18:16:41 +02: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())
}