MCPcopy
hub / github.com/gofiber/fiber / Test_App_ReloadViews_Success

Function Test_App_ReloadViews_Success

app_test.go:2197–2208  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2195func (*panicRenderView) Render(io.Writer, string, any, ...string) error { panic("panic render") }
2196
2197func Test_App_ReloadViews_Success(t *testing.T) {
2198 t.Parallel()
2199 view := &countingView{}
2200 app := New(Config{Views: view})
2201 initialLoads := view.loads
2202
2203 require.NoError(t, app.ReloadViews())
2204 require.Equal(t, initialLoads+1, view.loads)
2205
2206 require.NoError(t, app.ReloadViews())
2207 require.Equal(t, initialLoads+2, view.loads)
2208}
2209
2210func Test_App_ReloadViews_Error(t *testing.T) {
2211 t.Parallel()

Callers

nothing calls this directly

Calls 2

ReloadViewsMethod · 0.80
NewFunction · 0.70

Tested by

no test coverage detected