diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-21 11:17:29 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-03-21 11:17:29 +0000 |
commit | 79b4f681760e9d674e5b959abcb3087fee009008 (patch) | |
tree | 8d97b3c0a653e8f58bf7febb93e0d4e405043fed /test/unit/mailer_test.rb | |
parent | 5225fb70f533c992bd50435096ebd2bfb1c3e942 (diff) | |
download | redmine-79b4f681760e9d674e5b959abcb3087fee009008.tar.gz redmine-79b4f681760e9d674e5b959abcb3087fee009008.zip |
Adds an option to enable/disable email notifications during a project copy (#4672).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3608 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mailer_test.rb')
-rw-r--r-- | test/unit/mailer_test.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index 68b074a93..0641bab7d 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -338,6 +338,14 @@ class MailerTest < ActiveSupport::TestCase end end + def test_test + user = User.find(1) + valid_languages.each do |lang| + user.update_attribute :language, lang.to_s + assert Mailer.deliver_test(user) + end + end + def test_reminders Mailer.reminders(:days => 42) assert_equal 1, ActionMailer::Base.deliveries.size @@ -365,4 +373,13 @@ class MailerTest < ActiveSupport::TestCase assert_equal :it, current_language end + + def test_with_deliveries_off + Mailer.with_deliveries false do + Mailer.deliver_test(User.find(1)) + end + assert ActionMailer::Base.deliveries.empty? + # should restore perform_deliveries + assert ActionMailer::Base.perform_deliveries + end end |