MCPcopy
hub / github.com/gin-gonic/gin / TestSetHTMLTemplate

Function TestSetHTMLTemplate

ginS/gins_test.go:209–215  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

207}
208
209func TestSetHTMLTemplate(t *testing.T) {
210 tmpl := template.Must(template.New("test").Parse("Hello {{.}}"))
211 SetHTMLTemplate(tmpl)
212
213 // Verify engine has template set
214 assert.NotNil(t, engine())
215}
216
217func TestStaticFile(t *testing.T) {
218 StaticFile("/static-file", "../testdata/test_file.txt")

Callers

nothing calls this directly

Calls 1

SetHTMLTemplateFunction · 0.85

Tested by

no test coverage detected