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

Function TestFeedback_EmailTooLong

internal/agent/api_test.go:254–265  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

252}
253
254func TestFeedback_EmailTooLong(t *testing.T) {
255 server, _, _ := setupAPI(t)
256
257 longEmail := string(bytes.Repeat([]byte("a"), 255)) + "@example.com"
258 payload := fmt.Sprintf(`{"message":"test","email":"%s"}`, longEmail)
259 resp, _ := http.Post(server.URL+"/api/feedback", "application/json", bytes.NewBufferString(payload))
260 defer resp.Body.Close()
261
262 if resp.StatusCode != 400 {
263 t.Errorf("status = %d, want 400 for email too long", resp.StatusCode)
264 }
265}
266
267func TestFeedback_OversizedBody(t *testing.T) {
268 server, _, _ := setupAPI(t)

Callers

nothing calls this directly

Calls 2

setupAPIFunction · 0.85
CloseMethod · 0.45

Tested by

no test coverage detected