(t *testing.T)
| 121 | } |
| 122 | |
| 123 | func TestLoadHTMLGlobTestMode(t *testing.T) { |
| 124 | ts := setupHTMLFiles( |
| 125 | t, |
| 126 | TestMode, |
| 127 | false, |
| 128 | func(router *Engine) { |
| 129 | router.LoadHTMLGlob("./testdata/template/*") |
| 130 | }, |
| 131 | ) |
| 132 | defer ts.Close() |
| 133 | |
| 134 | res, err := http.Get(ts.URL + "/test") |
| 135 | if err != nil { |
| 136 | t.Error(err) |
| 137 | } |
| 138 | |
| 139 | resp, _ := io.ReadAll(res.Body) |
| 140 | assert.Equal(t, "<h1>Hello world</h1>", string(resp)) |
| 141 | } |
| 142 | |
| 143 | func TestLoadHTMLGlobReleaseMode(t *testing.T) { |
| 144 | ts := setupHTMLFiles( |
nothing calls this directly
no test coverage detected