(t *testing.T)
| 368 | } |
| 369 | |
| 370 | func TestLoadHTMLFSReleaseMode(t *testing.T) { |
| 371 | ts := setupHTMLFiles( |
| 372 | t, |
| 373 | ReleaseMode, |
| 374 | false, |
| 375 | func(router *Engine) { |
| 376 | router.LoadHTMLFS(tmplFS, "hello.tmpl", "raw.tmpl") |
| 377 | }, |
| 378 | ) |
| 379 | defer ts.Close() |
| 380 | |
| 381 | res, err := http.Get(ts.URL + "/test") |
| 382 | if err != nil { |
| 383 | t.Error(err) |
| 384 | } |
| 385 | |
| 386 | resp, _ := io.ReadAll(res.Body) |
| 387 | assert.Equal(t, "<h1>Hello world</h1>", string(resp)) |
| 388 | } |
| 389 | |
| 390 | func TestLoadHTMLFSUsingTLS(t *testing.T) { |
| 391 | ts := setupHTMLFiles( |
nothing calls this directly
no test coverage detected