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

Function TestFeedback_AllCategories

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

Source from the content-addressed store, hash-verified

177}
178
179func TestFeedback_AllCategories(t *testing.T) {
180 server, _, _ := setupAPI(t)
181
182 for _, cat := range []string{"bug", "feature", "general"} {
183 t.Run(cat, func(t *testing.T) {
184 payload := fmt.Sprintf(`{"message":"test %s","category":"%s"}`, cat, cat)
185 resp, _ := http.Post(server.URL+"/api/feedback", "application/json", bytes.NewBufferString(payload))
186 defer resp.Body.Close()
187
188 if resp.StatusCode != 200 {
189 t.Errorf("status = %d, want 200 for category %s", resp.StatusCode, cat)
190 }
191 })
192 }
193}
194
195func TestFeedback_InvalidJSON(t *testing.T) {
196 server, _, _ := setupAPI(t)

Callers

nothing calls this directly

Calls 3

setupAPIFunction · 0.85
RunMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected