aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-11-15 12:21:04 -0800
committerJeremy Kemper <jeremy@bitsweat.net>2008-11-15 12:21:04 -0800
commiteeea1a26ec7bd5e11caa4630ff7820c1c7f762e3 (patch)
tree3b193dba9756b45e1a0a70d47faa4c3e2ff946a9 /actionmailer/test
parent1304b664924bfea54fd6dc0dc924ae3d126ff92d (diff)
parent4f984c9d0e66601a81cb5ae6e3b50582e6dc0c2d (diff)
downloadrails-eeea1a26ec7bd5e11caa4630ff7820c1c7f762e3.tar.gz
rails-eeea1a26ec7bd5e11caa4630ff7820c1c7f762e3.tar.bz2
rails-eeea1a26ec7bd5e11caa4630ff7820c1c7f762e3.zip
Merge branch 'master' into testing
Diffstat (limited to 'actionmailer/test')
-rw-r--r--actionmailer/test/mail_service_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb
index f5cb372b2a..c49049cc6a 100644
--- a/actionmailer/test/mail_service_test.rb
+++ b/actionmailer/test/mail_service_test.rb
@@ -915,6 +915,8 @@ EOF
def test_multipart_with_template_path_with_dots
mail = FunkyPathMailer.create_multipart_with_template_path_with_dots(@recipient)
assert_equal 2, mail.parts.length
+ assert_equal 'text/plain', mail.parts[0].content_type
+ assert_equal 'utf-8', mail.parts[0].charset
end
def test_custom_content_type_attributes
@@ -1045,4 +1047,16 @@ class RespondToTest < Test::Unit::TestCase
def test_should_not_respond_to_deliver_with_template_suffix_if_it_begins_with_a_digit
assert !RespondToMailer.respond_to?(:deliver_1_template)
end
+
+ def test_should_not_respond_to_method_where_deliver_is_not_a_suffix
+ assert !RespondToMailer.respond_to?(:foo_deliver_template)
+ end
+
+ def test_should_still_raise_exception_with_expected_message_when_calling_an_undefined_method
+ error = assert_raises NoMethodError do
+ RespondToMailer.not_a_method
+ end
+
+ assert_match /undefined method.*not_a_method/, error.message
+ end
end