diff options
author | Matt Duncan <mrduncan@gmail.com> | 2009-08-07 21:37:21 -0400 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2009-08-08 14:11:32 +1200 |
commit | 5fdc33c1a37b4c321135753ed546e8afc2dbaf3e (patch) | |
tree | 06d27eef4fd37aff4c148a476587758ac648fc06 /actionmailer/test/mail_service_test.rb | |
parent | 98450fd168673c6bc698b3b2d3c264a9cd70a464 (diff) | |
download | rails-5fdc33c1a37b4c321135753ed546e8afc2dbaf3e.tar.gz rails-5fdc33c1a37b4c321135753ed546e8afc2dbaf3e.tar.bz2 rails-5fdc33c1a37b4c321135753ed546e8afc2dbaf3e.zip |
Default sent_on time to now in ActionMailer
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#2607 state:committed]
Diffstat (limited to 'actionmailer/test/mail_service_test.rb')
-rw-r--r-- | actionmailer/test/mail_service_test.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index f2a8c2303c..828661c16d 100644 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -18,7 +18,6 @@ class TestMailer < ActionMailer::Base @recipients = recipient @subject = "[Signed up] Welcome #{recipient}" @from = "system@loudthinking.com" - @sent_on = Time.local(2004, 12, 12) @body["recipient"] = recipient end @@ -357,12 +356,14 @@ class ActionMailerTest < Test::Unit::TestCase end def test_signed_up + Time.stubs(:now => Time.now) + expected = new_mail expected.to = @recipient expected.subject = "[Signed up] Welcome #{@recipient}" expected.body = "Hello there, \n\nMr. #{@recipient}" expected.from = "system@loudthinking.com" - expected.date = Time.local(2004, 12, 12) + expected.date = Time.now created = nil assert_nothing_raised { created = TestMailer.create_signed_up(@recipient) } |