From 134b66cb290f084a06a8a4ad7a21913cf002ca85 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 26 Jan 2013 18:07:57 +0000 Subject: Always notify project members about news unless they turned off all notifications (#4700). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11271 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/user_test.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test') 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 -- cgit v1.2.3