File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ### Unreleased
4+ * Removed ` file_path ` from ` File ` object to match the Send API schema
5+
36### 6.2.3 / 2025-01-23
47* Fixed issue where errors were not properly thrown due to an instance type of ` String ` instead of ` Hash `
58
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ def self.build_json_request(attachments)
6262 opened_files = [ ]
6363
6464 attachments . each_with_index do |attachment , _index |
65+ attachment . delete ( :file_path )
6566 current_attachment = attachment [ :content ]
6667 next unless current_attachment
6768
Original file line number Diff line number Diff line change 165165 expect ( opened_files ) . to include ( mock_file )
166166 end
167167
168+ it "removed the file_path key from the attachment" do
169+ attachments = [ { content : mock_file , file_path : "/path/to/file.txt" } ]
170+
171+ result , _opened_files = described_class . build_json_request ( attachments )
172+
173+ expect ( result . first ) . not_to have_key ( :file_path )
174+ end
175+
168176 it "skips attachments with no content" do
169177 attachments = [ { content : nil } ]
170178
You can’t perform that action at this time.
0 commit comments