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

Function TestFeedback_WhitespaceOnlyMessage

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

Source from the content-addressed store, hash-verified

140}
141
142func TestFeedback_WhitespaceOnlyMessage(t *testing.T) {
143 server, _, _ := setupAPI(t)
144
145 payload := `{"email":"","category":"general","message":" \n\t "}`
146 resp, _ := http.Post(server.URL+"/api/feedback", "application/json", bytes.NewBufferString(payload))
147 defer resp.Body.Close()
148
149 if resp.StatusCode != 400 {
150 t.Errorf("status = %d, want 400 for whitespace-only message", resp.StatusCode)
151 }
152}
153
154func TestFeedback_InvalidCategory(t *testing.T) {
155 server, _, _ := setupAPI(t)

Callers

nothing calls this directly

Calls 2

setupAPIFunction · 0.85
CloseMethod · 0.45

Tested by

no test coverage detected