(t *testing.T)
| 415 | } |
| 416 | |
| 417 | func TestLoadHTMLFSFuncMap(t *testing.T) { |
| 418 | ts := setupHTMLFiles( |
| 419 | t, |
| 420 | TestMode, |
| 421 | false, |
| 422 | func(router *Engine) { |
| 423 | router.LoadHTMLFS(tmplFS, "hello.tmpl", "raw.tmpl") |
| 424 | }, |
| 425 | ) |
| 426 | defer ts.Close() |
| 427 | |
| 428 | res, err := http.Get(ts.URL + "/raw") |
| 429 | if err != nil { |
| 430 | t.Error(err) |
| 431 | } |
| 432 | |
| 433 | resp, _ := io.ReadAll(res.Body) |
| 434 | assert.Equal(t, "Date: 2017/07/01", string(resp)) |
| 435 | } |
| 436 | |
| 437 | func TestAddRoute(t *testing.T) { |
| 438 | router := New() |
nothing calls this directly
no test coverage detected