Permalink
Browse files

Down to 13 failures, 14 errors

  • Loading branch information...
mikel committed Nov 20, 2009
1 parent a5e6295 commit 6456a08334703ceb91ed69b1426a171dc956e1b9
Showing with 14 additions and 7 deletions.
  1. +1 −1 actionmailer/lib/action_mailer/delivery_method/file.rb
  2. +13 −6 actionmailer/test/mail_service_test.rb
@@ -12,7 +12,7 @@ class File < Method
def perform_delivery(mail)
FileUtils.mkdir_p settings[:location]
- (mail.to + mail.cc + mail.bcc).uniq.each do |to|
+ mail.destinations.uniq.each do |to|
::File.open(::File.join(settings[:location], to), 'a') { |f| f.write(mail) }
end
end
@@ -561,12 +561,10 @@ def test_iso_charset
created = TestMailer.create_iso_charset @recipient
end
assert_not_nil created
- expected.message_id = '<123@456>'
- created.message_id = '<123@456>'
expected.message_id = '<123@456>'
created.message_id = '<123@456>'
-
+
assert_equal expected.encoded, created.encoded
assert_nothing_raised do
@@ -597,14 +595,23 @@ def test_unencoded_subject
created = TestMailer.create_unencoded_subject @recipient
end
assert_not_nil created
+
+ expected.message_id = '<123@456>'
+ created.message_id = '<123@456>'
+
assert_equal expected.encoded, created.encoded
assert_nothing_raised do
TestMailer.deliver_unencoded_subject @recipient
end
- assert_not_nil ActionMailer::Base.deliveries.first
- assert_equal expected.encoded, ActionMailer::Base.deliveries.first.encoded
+ delivered = ActionMailer::Base.deliveries.first
+ assert_not_nil delivered
+
+ expected.message_id = '<123@456>'
+ delivered.message_id = '<123@456>'
+
+ assert_equal expected.encoded, delivered.encoded
end
def test_instances_are_nil
@@ -1065,7 +1072,7 @@ def test_return_path_with_deliver
def test_body_is_stored_as_an_ivar
mail = TestMailer.create_body_ivar(@recipient)
- assert_equal "body: foo\nbar: baz", mail.body.encoded
+ assert_equal "body: foo\nbar: baz", mail.body.decoded
end
def test_starttls_is_enabled_if_supported

0 comments on commit 6456a08

Please sign in to comment.