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

Function TestGetConversationRejectsCRLF

internal/httpapi/conversations_test.go:57–67  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

55}
56
57func 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}

Callers

nothing calls this directly

Calls 2

testServerFunction · 0.85
getJSONFunction · 0.85

Tested by

no test coverage detected