MCPcopy
hub / github.com/pocketbase/pocketbase / TestFindUploadedFilesMissing

Function TestFindUploadedFilesMissing

tools/router/event_test.go:275–293  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

273}
274
275func TestFindUploadedFilesMissing(t *testing.T) {
276 body := new(bytes.Buffer)
277 mp := multipart.NewWriter(body)
278 mp.Close()
279
280 req := httptest.NewRequest(http.MethodPost, "/", body)
281 req.Header.Add("Content-Type", mp.FormDataContentType())
282
283 event := router.Event{Request: req}
284
285 result, err := event.FindUploadedFiles("test")
286 if err == nil {
287 t.Error("Expected error, got nil")
288 }
289
290 if result != nil {
291 t.Errorf("Expected result to be nil, got %v", result)
292 }
293}
294
295func TestEventSetGet(t *testing.T) {
296 event := router.Event{}

Callers

nothing calls this directly

Calls 5

CloseMethod · 0.95
FindUploadedFilesMethod · 0.95
NewWriterMethod · 0.80
ErrorMethod · 0.65
AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…