aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-09-02 19:35:55 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-09-02 19:35:55 +0000
commit3859d6da6e3c577c00a6a3610f8ba1b1911f1029 (patch)
treea1d14a71cd37a2ffcf589c7c8c7a58aa70afdd39 /actionmailer
parent20bd4bd3e2bff716acdf48bba1b97a1afdcd088d (diff)
downloadrails-3859d6da6e3c577c00a6a3610f8ba1b1911f1029.tar.gz
rails-3859d6da6e3c577c00a6a3610f8ba1b1911f1029.tar.bz2
rails-3859d6da6e3c577c00a6a3610f8ba1b1911f1029.zip
Added test for custom headers on parts (closes #3043)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4903 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer')
-rwxr-xr-xactionmailer/test/mail_service_test.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb
index bcce81e3aa..544413b328 100755
--- a/actionmailer/test/mail_service_test.rb
+++ b/actionmailer/test/mail_service_test.rb
@@ -214,7 +214,7 @@ class TestMailer < ActionMailer::Base
subject "nested multipart"
from "test@example.com"
content_type "multipart/mixed"
- part :content_type => "multipart/alternative", :content_disposition => "inline" do |p|
+ part :content_type => "multipart/alternative", :content_disposition => "inline", :headers => { "foo" => "bar" } do |p|
p.part :content_type => "text/plain", :body => "test text\nline #2"
p.part :content_type => "text/html", :body => "<b>test</b> HTML<br/>\nline #2"
end
@@ -296,6 +296,7 @@ class ActionMailerTest < Test::Unit::TestCase
assert_equal "multipart/mixed", created.content_type
assert_equal "multipart/alternative", created.parts.first.content_type
+ assert_equal "bar", created.parts.first.header['foo'].to_s
assert_equal "text/plain", created.parts.first.parts.first.content_type
assert_equal "text/html", created.parts.first.parts[1].content_type
assert_equal "application/octet-stream", created.parts[1].content_type