(t *testing.T)
| 55 | } |
| 56 | |
| 57 | func TestGetConversationRejectsCRLF(t *testing.T) { |
| 58 | srv := testServer(t) |
| 59 | // %0A is a newline — must be rejected before the store lookup. |
| 60 | code, body := getJSON(t, srv.URL+"/v1/agents/support%40acme.com/conversations/conv%0Abad", "good") |
| 61 | if code != 400 { |
| 62 | t.Fatalf("want 400, got %d", code) |
| 63 | } |
| 64 | if errObj, _ := body["error"].(map[string]any); errObj["code"] != "invalid_request" { |
| 65 | t.Fatalf("want invalid_request, got %v", body) |
| 66 | } |
| 67 | } |
nothing calls this directly
no test coverage detected