(t *testing.T)
| 141 | } |
| 142 | |
| 143 | func TestLoadHTMLGlobReleaseMode(t *testing.T) { |
| 144 | ts := setupHTMLFiles( |
| 145 | t, |
| 146 | ReleaseMode, |
| 147 | false, |
| 148 | func(router *Engine) { |
| 149 | router.LoadHTMLGlob("./testdata/template/*") |
| 150 | }, |
| 151 | ) |
| 152 | defer ts.Close() |
| 153 | |
| 154 | res, err := http.Get(ts.URL + "/test") |
| 155 | if err != nil { |
| 156 | t.Error(err) |
| 157 | } |
| 158 | |
| 159 | resp, _ := io.ReadAll(res.Body) |
| 160 | assert.Equal(t, "<h1>Hello world</h1>", string(resp)) |
| 161 | } |
| 162 | |
| 163 | func TestLoadHTMLGlobUsingTLS(t *testing.T) { |
| 164 | ts := setupHTMLFiles( |
nothing calls this directly
no test coverage detected