diff options
author | Jamis Buck <jamis@37signals.com> | 2005-08-22 20:43:43 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-08-22 20:43:43 +0000 |
commit | b13efaf9855d5dc060972dae11ef97ab28c93e44 (patch) | |
tree | 4c3a9573f1e8d0c622a061698022fcc22b7cf353 /actionmailer/test | |
parent | 82f44f314402cbd4627caa1c8ba24c35a5c875dd (diff) | |
download | rails-b13efaf9855d5dc060972dae11ef97ab28c93e44.tar.gz rails-b13efaf9855d5dc060972dae11ef97ab28c93e44.tar.bz2 rails-b13efaf9855d5dc060972dae11ef97ab28c93e44.zip |
Look at content-location header (if available) to determine filename of attachments #1670
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2034 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/test')
-rwxr-xr-x | actionmailer/test/mail_service_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index 1cabb06c53..97bdcaa1f8 100755 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -527,6 +527,13 @@ EOF assert_equal 1026, attachment.read.length end + def test_attachment_using_content_location + fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email12") + mail = TMail::Mail.parse(fixture) + assert_equal 1, mail.attachments.length + assert_equal "Photo25.jpg", mail.attachments.first.original_filename + end + def test_decode_part_without_content_type fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email4") mail = TMail::Mail.parse(fixture) |