diff options
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| |