summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/unit/user_test.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index c0e51d469..6aa7fe19c 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -1018,9 +1018,15 @@ class UserTest < ActiveSupport::TestCase
assert ! @user.notify_about?(@issue)
end
end
+ end
+
+ def test_notify_about_news
+ user = User.generate!
+ news = News.new
- context "other events" do
- should 'be added and tested'
+ User::MAIL_NOTIFICATION_OPTIONS.map(&:first).each do |option|
+ user.mail_notification = option
+ assert_equal (option != 'none'), user.notify_about?(news)
end
end