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

Function TestAttachment_InlineSmall

internal/httpapi/attachment_endpoint_test.go:124–134  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

122}
123
124func TestAttachment_InlineSmall(t *testing.T) {
125 srv := attTestServer(t)
126 code, body := getJSONAtt(t, srv.URL+"/v1/agents/support%40acme.com/messages/msg_att/attachments/0?inline=true", "acct")
127 if code != 200 {
128 t.Fatalf("want 200, got %d: %v", code, body)
129 }
130 dec, _ := base64.StdEncoding.DecodeString(body["data"].(string))
131 if string(dec) != "%PDF-1.4 hello" {
132 t.Errorf("inline data wrong: %q", dec)
133 }
134}
135
136func TestAttachment_InlineTooLarge(t *testing.T) {
137 srv := attTestServer(t)

Callers

nothing calls this directly

Calls 2

attTestServerFunction · 0.85
getJSONAttFunction · 0.85

Tested by

no test coverage detected