aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/url_test.rb
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2006-09-09 21:56:38 +0000
committerJamis Buck <jamis@37signals.com>2006-09-09 21:56:38 +0000
commit45b5555f4cefaa61456e618e732c9ee5bb5b4e83 (patch)
tree499eded831bf7a1e95a66aa96fffdbc460f0b140 /actionmailer/test/url_test.rb
parent4d9ca4d9fbed86936b6a2cee792ea8509eef81b2 (diff)
downloadrails-45b5555f4cefaa61456e618e732c9ee5bb5b4e83.tar.gz
rails-45b5555f4cefaa61456e618e732c9ee5bb5b4e83.tar.bz2
rails-45b5555f4cefaa61456e618e732c9ee5bb5b4e83.zip
Make mime version default to 1.0. closes #2323
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionmailer/test/url_test.rb')
-rw-r--r--actionmailer/test/url_test.rb24
1 files changed, 2 insertions, 22 deletions
diff --git a/actionmailer/test/url_test.rb b/actionmailer/test/url_test.rb
index b953154515..ded343cfc5 100644
--- a/actionmailer/test/url_test.rb
+++ b/actionmailer/test/url_test.rb
@@ -1,25 +1,5 @@
require "#{File.dirname(__FILE__)}/abstract_unit"
-class MockSMTP
- def self.deliveries
- @@deliveries
- end
-
- def initialize
- @@deliveries = []
- end
-
- def sendmail(mail, from, to)
- @@deliveries << [mail, from, to]
- end
-end
-
-class Net::SMTP
- def self.start(*args)
- yield MockSMTP.new
- end
-end
-
class TestMailer < ActionMailer::Base
def signed_up_with_url(recipient)
@recipients = recipient
@@ -40,7 +20,7 @@ class TestMailer < ActionMailer::Base
end
end
-class ActionMailerTest < Test::Unit::TestCase
+class ActionMailerUrlTest < Test::Unit::TestCase
include ActionMailer::Quoting
def encode( text, charset="utf-8" )
@@ -49,6 +29,7 @@ class ActionMailerTest < Test::Unit::TestCase
def new_mail( charset="utf-8" )
mail = TMail::Mail.new
+ mail.mime_version = "1.0"
if charset
mail.set_content_type "text", "plain", { "charset" => charset }
end
@@ -74,7 +55,6 @@ class ActionMailerTest < Test::Unit::TestCase
expected.body = "Hello there, \n\nMr. #{@recipient}. Please see our greeting at http://example.com/welcome/greeting"
expected.from = "system@loudthinking.com"
expected.date = Time.local(2004, 12, 12)
- expected.mime_version = nil
created = nil
assert_nothing_raised { created = TestMailer.create_signed_up_with_url(@recipient) }