diff options
author | José Valim and Mikel Lindsaar <pair@programming.com> | 2010-01-26 01:51:23 +0100 |
---|---|---|
committer | José Valim and Mikel Lindsaar <pair@programming.com> | 2010-01-26 01:51:23 +0100 |
commit | 4af2bbc6b446726b7174d06b5bffbaba82906cbb (patch) | |
tree | 08981544e55ec1b709226e914942d01fa99adda2 /actionmailer/test | |
parent | 6589976533b7a6850390ed5d6526ca719e56c5ca (diff) | |
parent | 74a5889abef1212d373ea994f1c93daedee8932c (diff) | |
download | rails-4af2bbc6b446726b7174d06b5bffbaba82906cbb.tar.gz rails-4af2bbc6b446726b7174d06b5bffbaba82906cbb.tar.bz2 rails-4af2bbc6b446726b7174d06b5bffbaba82906cbb.zip |
Merge branch 'master' of github.com:mikel/rails
Diffstat (limited to 'actionmailer/test')
-rw-r--r-- | actionmailer/test/base_test.rb | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/actionmailer/test/base_test.rb b/actionmailer/test/base_test.rb index 856b5b2d3c..83707137e1 100644 --- a/actionmailer/test/base_test.rb +++ b/actionmailer/test/base_test.rb @@ -207,7 +207,7 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart" do email = BaseMailer.implicit_multipart.deliver assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) + assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) assert_equal("TEXT Implicit Multipart", email.parts[0].body.encoded) assert_equal("text/html", email.parts[1].mime_type) @@ -230,7 +230,7 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart with attachments creates nested parts" do email = BaseMailer.implicit_multipart(:attachments => true).deliver assert_equal("application/pdf", email.parts[0].mime_type) - assert_equal("multipart/alternate", email.parts[1].mime_type) + assert_equal("multipart/alternative", email.parts[1].mime_type) assert_equal("text/plain", email.parts[1].parts[0].mime_type) assert_equal("TEXT Implicit Multipart", email.parts[1].parts[0].body.encoded) assert_equal("text/html", email.parts[1].parts[1].mime_type) @@ -242,7 +242,7 @@ class BaseTest < ActiveSupport::TestCase swap BaseMailer, :default_implicit_parts_order => order do email = BaseMailer.implicit_multipart(:attachments => true).deliver assert_equal("application/pdf", email.parts[0].mime_type) - assert_equal("multipart/alternate", email.parts[1].mime_type) + assert_equal("multipart/alternative", email.parts[1].mime_type) assert_equal("text/plain", email.parts[1].parts[1].mime_type) assert_equal("text/html", email.parts[1].parts[0].mime_type) end @@ -251,7 +251,7 @@ class BaseTest < ActiveSupport::TestCase test "implicit multipart with default locale" do email = BaseMailer.implicit_with_locale.deliver assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) + assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) assert_equal("Implicit with locale TEXT", email.parts[0].body.encoded) assert_equal("text/html", email.parts[1].mime_type) @@ -262,7 +262,7 @@ class BaseTest < ActiveSupport::TestCase swap I18n, :locale => :pl do email = BaseMailer.implicit_with_locale.deliver assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) + assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) assert_equal("Implicit with locale PL TEXT", email.parts[0].body.encoded) assert_equal("text/html", email.parts[1].mime_type) @@ -294,7 +294,7 @@ class BaseTest < ActiveSupport::TestCase test "explicit multipart" do email = BaseMailer.explicit_multipart.deliver assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) + assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) assert_equal("TEXT Explicit Multipart", email.parts[0].body.encoded) assert_equal("text/html", email.parts[1].mime_type) @@ -317,7 +317,7 @@ class BaseTest < ActiveSupport::TestCase test "explicit multipart with attachments creates nested parts" do email = BaseMailer.explicit_multipart(:attachments => true).deliver assert_equal("application/pdf", email.parts[0].mime_type) - assert_equal("multipart/alternate", email.parts[1].mime_type) + assert_equal("multipart/alternative", email.parts[1].mime_type) assert_equal("text/plain", email.parts[1].parts[0].mime_type) assert_equal("TEXT Explicit Multipart", email.parts[1].parts[0].body.encoded) assert_equal("text/html", email.parts[1].parts[1].mime_type) @@ -327,7 +327,7 @@ class BaseTest < ActiveSupport::TestCase test "explicit multipart with templates" do email = BaseMailer.explicit_multipart_templates.deliver assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) + assert_equal("multipart/alternative", email.mime_type) assert_equal("text/html", email.parts[0].mime_type) assert_equal("HTML Explicit Multipart Templates", email.parts[0].body.encoded) assert_equal("text/plain", email.parts[1].mime_type) @@ -337,7 +337,7 @@ class BaseTest < ActiveSupport::TestCase test "explicit multipart with any" do email = BaseMailer.explicit_multipart_with_any.deliver assert_equal(2, email.parts.size) - assert_equal("multipart/alternate", email.mime_type) + assert_equal("multipart/alternative", email.mime_type) assert_equal("text/plain", email.parts[0].mime_type) assert_equal("Format with any!", email.parts[0].body.encoded) assert_equal("text/html", email.parts[1].mime_type) @@ -394,6 +394,11 @@ class BaseTest < ActiveSupport::TestCase BaseMailer.expects(:welcome).returns(mail) BaseMailer.welcome.deliver end + + test "explicit multipart should be multipart" do + mail = BaseMailer.explicit_multipart + assert_not_nil(mail.content_type_parameters[:boundary]) + end protected |