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

Function Test_Ctx_SaveFileToStorage_NilFileHeader

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

Source from the content-addressed store, hash-verified

5830}
5831
5832func Test_Ctx_SaveFileToStorage_NilFileHeader(t *testing.T) {
5833 t.Parallel()
5834
5835 app := New()
5836 storage := memory.New()
5837
5838 ctx := app.AcquireCtx(&fasthttp.RequestCtx{})
5839 defer app.ReleaseCtx(ctx)
5840
5841 err := ctx.SaveFileToStorage(nil, "test", storage)
5842
5843 require.Error(t, err)
5844 require.ErrorIs(t, err, ErrFileHeaderNil)
5845}
5846
5847func Test_Ctx_SaveFile_NilFileHeader(t *testing.T) {
5848 t.Parallel()

Callers

nothing calls this directly

Calls 6

NewFunction · 0.92
AcquireCtxMethod · 0.80
ReleaseCtxMethod · 0.80
NewFunction · 0.70
SaveFileToStorageMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected