(t *testing.T)
| 219 | } |
| 220 | |
| 221 | func TestLoadHTMLFilesTestMode(t *testing.T) { |
| 222 | ts := setupHTMLFiles( |
| 223 | t, |
| 224 | TestMode, |
| 225 | false, |
| 226 | func(router *Engine) { |
| 227 | router.LoadHTMLFiles("./testdata/template/hello.tmpl", "./testdata/template/raw.tmpl") |
| 228 | }, |
| 229 | ) |
| 230 | defer ts.Close() |
| 231 | |
| 232 | res, err := http.Get(ts.URL + "/test") |
| 233 | if err != nil { |
| 234 | t.Error(err) |
| 235 | } |
| 236 | |
| 237 | resp, _ := io.ReadAll(res.Body) |
| 238 | assert.Equal(t, "<h1>Hello world</h1>", string(resp)) |
| 239 | } |
| 240 | |
| 241 | func TestLoadHTMLFilesDebugMode(t *testing.T) { |
| 242 | ts := setupHTMLFiles( |
nothing calls this directly
no test coverage detected