(t *testing.T)
| 128 | } |
| 129 | |
| 130 | func TestFeedback_EmptyMessage(t *testing.T) { |
| 131 | server, _, _ := setupAPI(t) |
| 132 | |
| 133 | payload := `{"email":"user@example.com","category":"bug","message":""}` |
| 134 | resp, _ := http.Post(server.URL+"/api/feedback", "application/json", bytes.NewBufferString(payload)) |
| 135 | defer resp.Body.Close() |
| 136 | |
| 137 | if resp.StatusCode != 400 { |
| 138 | t.Errorf("status = %d, want 400", resp.StatusCode) |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | func TestFeedback_WhitespaceOnlyMessage(t *testing.T) { |
| 143 | server, _, _ := setupAPI(t) |