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
This commit is contained in:
@@ -1018,9 +1018,15 @@ class UserTest < ActiveSupport::TestCase
|
||||
assert ! @user.notify_about?(@issue)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "other events" do
|
||||
should 'be added and tested'
|
||||
def test_notify_about_news
|
||||
user = User.generate!
|
||||
news = News.new
|
||||
|
||||
User::MAIL_NOTIFICATION_OPTIONS.map(&:first).each do |option|
|
||||
user.mail_notification = option
|
||||
assert_equal (option != 'none'), user.notify_about?(news)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user