Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions spec/mail/attachments_list_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ def check_decoded(actual, expected)
expect(Mail::Utilities.blank?(@mail.attachments)).not_to eq true
expect(Mail::Encodings.decode_encode(@mail.attachments[0].filename, :decode)).to eq 'てすと.txt'
end

it "should accept multiple files with the same filename" do
@mail.attachments['test.png'] = @test_png
@mail.attachments['test.png'] = @test_png
expect(@mail.attachments.count).to eq 2
expect(Mail::Encodings.decode_encode(@mail.attachments[0].filename, :decode)).to eq 'test.png'
expect(Mail::Encodings.decode_encode(@mail.attachments[1].filename, :decode)).to eq 'test.png'
end
end

describe "from a supplied Hash" do
Expand Down