aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-05-10 15:30:18 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-05-10 15:30:18 +0000
commitee6882614f46c33277c36504d125672bb8f6c34e (patch)
treeb4ea625cf335a5ac98f015410657e5ba6a5c82e8 /actionmailer/test
parent9c9286710268ff124ffe68727030dbe401bbc3c2 (diff)
downloadrails-ee6882614f46c33277c36504d125672bb8f6c34e.tar.gz
rails-ee6882614f46c33277c36504d125672bb8f6c34e.tar.bz2
rails-ee6882614f46c33277c36504d125672bb8f6c34e.zip
Step cautiously around subheaders in TMail #1285 [Jamis Buck]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1301 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/test')
-rw-r--r--actionmailer/test/fixtures/raw_email519
-rwxr-xr-xactionmailer/test/mail_service_test.rb8
2 files changed, 26 insertions, 1 deletions
diff --git a/actionmailer/test/fixtures/raw_email5 b/actionmailer/test/fixtures/raw_email5
new file mode 100644
index 0000000000..151c631471
--- /dev/null
+++ b/actionmailer/test/fixtures/raw_email5
@@ -0,0 +1,19 @@
+Return-Path: <xxx@xxxx.xxx>
+Received: from xxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id C1B953B4CB6 for <xxxxx@Exxx.xxxx.xxx>; Tue, 10 May 2005 15:27:05 -0500
+Received: from SMS-GTYxxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id ca for <xxxxx@Exxx.xxxx.xxx>; Tue, 10 May 2005 15:27:04 -0500
+Received: from xxx.xxxx.xxx by SMS-GTYxxx.xxxx.xxx with ESMTP id j4AKR3r23323 for <xxxxx@Exxx.xxxx.xxx>; Tue, 10 May 2005 15:27:03 -0500
+Date: Tue, 10 May 2005 15:27:03 -0500
+From: xxx@xxxx.xxx
+Sender: xxx@xxxx.xxx
+To: xxxxxxxxxxx@xxxx.xxxx.xxx
+Message-Id: <xxx@xxxx.xxx>
+X-Original-To: xxxxxxxxxxx@xxxx.xxxx.xxx
+Delivered-To: xxx@xxxx.xxx
+Importance: normal
+
+Test test. Hi. Waving. m
+
+----------------------------------------------------------------
+Sent via Bell Mobility's Text Messaging service.
+Envoyé par le service de messagerie texte de Bell Mobilité.
+----------------------------------------------------------------
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb
index 8609d0c16c..733ec61e41 100755
--- a/actionmailer/test/mail_service_test.rb
+++ b/actionmailer/test/mail_service_test.rb
@@ -388,11 +388,17 @@ EOF
assert_equal 1026, attachment.read.length
end
- def test_decode_message_without_content_type
+ def test_decode_part_without_content_type
fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email4")
mail = TMail::Mail.parse(fixture)
assert_nothing_raised { mail.body }
end
+ def test_decode_message_without_content_type
+ fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email5")
+ mail = TMail::Mail.parse(fixture)
+ assert_nothing_raised { mail.body }
+ end
+
end