(t *testing.T)
| 239 | } |
| 240 | |
| 241 | func TestLoadHTMLFilesDebugMode(t *testing.T) { |
| 242 | ts := setupHTMLFiles( |
| 243 | t, |
| 244 | DebugMode, |
| 245 | false, |
| 246 | func(router *Engine) { |
| 247 | router.LoadHTMLFiles("./testdata/template/hello.tmpl", "./testdata/template/raw.tmpl") |
| 248 | }, |
| 249 | ) |
| 250 | defer ts.Close() |
| 251 | |
| 252 | res, err := http.Get(ts.URL + "/test") |
| 253 | if err != nil { |
| 254 | t.Error(err) |
| 255 | } |
| 256 | |
| 257 | resp, _ := io.ReadAll(res.Body) |
| 258 | assert.Equal(t, "<h1>Hello world</h1>", string(resp)) |
| 259 | } |
| 260 | |
| 261 | func TestLoadHTMLFilesReleaseMode(t *testing.T) { |
| 262 | ts := setupHTMLFiles( |
nothing calls this directly
no test coverage detected