(t *testing.T)
| 188 | } |
| 189 | |
| 190 | func TestLoadHTMLGlobFromFuncMap(t *testing.T) { |
| 191 | ts := setupHTMLFiles( |
| 192 | t, |
| 193 | DebugMode, |
| 194 | false, |
| 195 | func(router *Engine) { |
| 196 | router.LoadHTMLGlob("./testdata/template/*") |
| 197 | }, |
| 198 | ) |
| 199 | defer ts.Close() |
| 200 | |
| 201 | res, err := http.Get(ts.URL + "/raw") |
| 202 | if err != nil { |
| 203 | t.Error(err) |
| 204 | } |
| 205 | |
| 206 | resp, _ := io.ReadAll(res.Body) |
| 207 | assert.Equal(t, "Date: 2017/07/01", string(resp)) |
| 208 | } |
| 209 | |
| 210 | func init() { |
| 211 | SetMode(TestMode) |
nothing calls this directly
no test coverage detected