(t *testing.T)
| 193 | } |
| 194 | |
| 195 | func TestFeedback_InvalidJSON(t *testing.T) { |
| 196 | server, _, _ := setupAPI(t) |
| 197 | |
| 198 | resp, _ := http.Post(server.URL+"/api/feedback", "application/json", bytes.NewBufferString(`not json`)) |
| 199 | defer resp.Body.Close() |
| 200 | |
| 201 | if resp.StatusCode != 400 { |
| 202 | t.Errorf("status = %d, want 400 for invalid JSON", resp.StatusCode) |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | func TestFeedback_MessageTooLong(t *testing.T) { |
| 207 | server, _, _ := setupAPI(t) |