MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / TestMagicLinkGETMissingToken

Function TestMagicLinkGETMissingToken

internal/agent/hitl_magic_api_test.go:353–362  ·  view source on GitHub ↗

--- Error paths (GET rejects + POST rejects consistently) ---

(t *testing.T)

Source from the content-addressed store, hash-verified

351// --- Error paths (GET rejects + POST rejects consistently) ---
352
353func TestMagicLinkGETMissingToken(t *testing.T) {
354 server, _, _, smtpDone := setupMagicLinkAPI(t)
355 defer smtpDone()
356
357 resp, _ := http.Get(server.URL + "/v1/approve")
358 defer resp.Body.Close()
359 if resp.StatusCode != http.StatusBadRequest {
360 t.Errorf("status = %d, want 400", resp.StatusCode)
361 }
362}
363
364func TestMagicLinkPOSTMissingToken(t *testing.T) {
365 server, _, _, smtpDone := setupMagicLinkAPI(t)

Callers

nothing calls this directly

Calls 3

setupMagicLinkAPIFunction · 0.85
GetMethod · 0.65
CloseMethod · 0.45

Tested by

no test coverage detected