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

Function TestMagicLinkPOSTInvalidToken

internal/agent/hitl_magic_api_test.go:386–395  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

384}
385
386func TestMagicLinkPOSTInvalidToken(t *testing.T) {
387 server, _, _, smtpDone := setupMagicLinkAPI(t)
388 defer smtpDone()
389
390 resp := postForm(t, server.URL+"/v1/approve", map[string]string{"t": "gibberish"})
391 defer resp.Body.Close()
392 if resp.StatusCode != http.StatusBadRequest {
393 t.Errorf("status = %d, want 400", resp.StatusCode)
394 }
395}
396
397func TestMagicLinkExpiredToken(t *testing.T) {
398 server, store, signer, smtpDone := setupMagicLinkAPI(t)

Callers

nothing calls this directly

Calls 3

setupMagicLinkAPIFunction · 0.85
postFormFunction · 0.85
CloseMethod · 0.45

Tested by

no test coverage detected