(t *testing.T)
| 259 | } |
| 260 | |
| 261 | func TestLoadHTMLFilesReleaseMode(t *testing.T) { |
| 262 | ts := setupHTMLFiles( |
| 263 | t, |
| 264 | ReleaseMode, |
| 265 | false, |
| 266 | func(router *Engine) { |
| 267 | router.LoadHTMLFiles("./testdata/template/hello.tmpl", "./testdata/template/raw.tmpl") |
| 268 | }, |
| 269 | ) |
| 270 | defer ts.Close() |
| 271 | |
| 272 | res, err := http.Get(ts.URL + "/test") |
| 273 | if err != nil { |
| 274 | t.Error(err) |
| 275 | } |
| 276 | |
| 277 | resp, _ := io.ReadAll(res.Body) |
| 278 | assert.Equal(t, "<h1>Hello world</h1>", string(resp)) |
| 279 | } |
| 280 | |
| 281 | func TestLoadHTMLFilesUsingTLS(t *testing.T) { |
| 282 | ts := setupHTMLFiles( |
nothing calls this directly
no test coverage detected