(t *testing.T)
| 348 | } |
| 349 | |
| 350 | func TestLoadHTMLFSDebugMode(t *testing.T) { |
| 351 | ts := setupHTMLFiles( |
| 352 | t, |
| 353 | DebugMode, |
| 354 | false, |
| 355 | func(router *Engine) { |
| 356 | router.LoadHTMLFS(tmplFS, "hello.tmpl", "raw.tmpl") |
| 357 | }, |
| 358 | ) |
| 359 | defer ts.Close() |
| 360 | |
| 361 | res, err := http.Get(ts.URL + "/test") |
| 362 | if err != nil { |
| 363 | t.Error(err) |
| 364 | } |
| 365 | |
| 366 | resp, _ := io.ReadAll(res.Body) |
| 367 | assert.Equal(t, "<h1>Hello world</h1>", string(resp)) |
| 368 | } |
| 369 | |
| 370 | func TestLoadHTMLFSReleaseMode(t *testing.T) { |
| 371 | ts := setupHTMLFiles( |
nothing calls this directly
no test coverage detected