diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-02-09 11:54:21 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-02-09 11:54:21 +0000 |
commit | 1ad33134d3005af9a1c8357a55e8c6ab9332d4fa (patch) | |
tree | d964e26f55acaa8791ab15776de735fc3cfc682b /test/unit/mailer_test.rb | |
parent | fa31229a2338706455dd754fd57e7f7e8ebf26a7 (diff) | |
download | redmine-1ad33134d3005af9a1c8357a55e8c6ab9332d4fa.tar.gz redmine-1ad33134d3005af9a1c8357a55e8c6ab9332d4fa.zip |
Enable the watching of news (#2549).
git-svn-id: http://svn.redmine.org/redmine/trunk@12866 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/mailer_test.rb')
-rw-r--r-- | test/unit/mailer_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit/mailer_test.rb b/test/unit/mailer_test.rb index b5f4086f7..5c155e6a5 100644 --- a/test/unit/mailer_test.rb +++ b/test/unit/mailer_test.rb @@ -467,6 +467,17 @@ class MailerTest < ActiveSupport::TestCase end end + def test_news_added_should_notify_project_news_watchers + user1 = User.generate! + user2 = User.generate! + news = News.first + news.project.enabled_module('news').add_watcher(user1) + + Mailer.news_added(news).deliver + assert_include user1.mail, last_email.bcc + assert_not_include user2.mail, last_email.bcc + end + def test_news_comment_added comment = Comment.find(2) valid_languages.each do |lang| |