MCPcopy
hub / github.com/cweill/gotests / TestRender_LoadFromData

Function TestRender_LoadFromData

internal/render/render_test.go:94–106  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

92}
93
94func TestRender_LoadFromData(t *testing.T) {
95 r := New()
96 templateData := [][]byte{
97 []byte(`{{define "mytemplate"}}test{{end}}`),
98 }
99
100 // Should not panic
101 r.LoadFromData(templateData)
102
103 if r.tmpls == nil {
104 t.Error("LoadFromData() resulted in nil templates")
105 }
106}
107
108func TestRender_Header(t *testing.T) {
109 r := New()

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
LoadFromDataMethod · 0.80

Tested by

no test coverage detected