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

Function TestFeedback_OptionalEmail

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

Source from the content-addressed store, hash-verified

239}
240
241func TestFeedback_OptionalEmail(t *testing.T) {
242 server, _, _ := setupAPI(t)
243
244 // No email field at all — should succeed
245 payload := `{"message":"anonymous feedback","category":"general"}`
246 resp, _ := http.Post(server.URL+"/api/feedback", "application/json", bytes.NewBufferString(payload))
247 defer resp.Body.Close()
248
249 if resp.StatusCode != 200 {
250 t.Errorf("status = %d, want 200 for feedback without email", resp.StatusCode)
251 }
252}
253
254func TestFeedback_EmailTooLong(t *testing.T) {
255 server, _, _ := setupAPI(t)

Callers

nothing calls this directly

Calls 2

setupAPIFunction · 0.85
CloseMethod · 0.45

Tested by

no test coverage detected