(t *testing.T)
| 122 | } |
| 123 | |
| 124 | func 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 | |
| 136 | func TestAttachment_InlineTooLarge(t *testing.T) { |
| 137 | srv := attTestServer(t) |
nothing calls this directly
no test coverage detected