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

Function TestFeedback_InvalidCategory

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

Source from the content-addressed store, hash-verified

152}
153
154func TestFeedback_InvalidCategory(t *testing.T) {
155 server, _, _ := setupAPI(t)
156
157 payload := `{"message":"hello","category":"invalid"}`
158 resp, _ := http.Post(server.URL+"/api/feedback", "application/json", bytes.NewBufferString(payload))
159 defer resp.Body.Close()
160
161 if resp.StatusCode != 400 {
162 t.Errorf("status = %d, want 400 for invalid category", resp.StatusCode)
163 }
164}
165
166func TestFeedback_DefaultCategory(t *testing.T) {
167 server, _, _ := setupAPI(t)

Callers

nothing calls this directly

Calls 2

setupAPIFunction · 0.85
CloseMethod · 0.45

Tested by

no test coverage detected