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

Function Test_Ctx_SaveFile_NilFileHeader

ctx_test.go:5847–5858  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

5845}
5846
5847func Test_Ctx_SaveFile_NilFileHeader(t *testing.T) {
5848 t.Parallel()
5849
5850 app := New()
5851 ctx := app.AcquireCtx(&fasthttp.RequestCtx{})
5852 defer app.ReleaseCtx(ctx)
5853
5854 err := ctx.SaveFile(nil, "test")
5855
5856 require.Error(t, err)
5857 require.ErrorIs(t, err, ErrFileHeaderNil)
5858}
5859
5860func Test_Ctx_SaveFileToStorage_DefaultBodyLimitFallback(t *testing.T) {
5861 t.Parallel()

Callers

nothing calls this directly

Calls 5

AcquireCtxMethod · 0.80
ReleaseCtxMethod · 0.80
NewFunction · 0.70
SaveFileMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected