##// END OF EJS Templates
Fixed: Email notifications are sent to watchers even if 'No events' setting is chosen (#7763)....
Jean-Philippe Lang -
r4884:8fb446e87fa5
parent child
Show More
@@ -60,15 +60,15 class WatcherTest < ActiveSupport::TestCase
60 60 assert @issue.watcher_recipients.empty?
61 61 assert @issue.add_watcher(@user)
62 62
63 @user.mail_notification = true
64 @user.save
63 @user.mail_notification = 'all'
64 @user.save!
65 65 @issue.reload
66 66 assert @issue.watcher_recipients.include?(@user.mail)
67 67
68 @user.mail_notification = false
69 @user.save
68 @user.mail_notification = 'none'
69 @user.save!
70 70 @issue.reload
71 assert @issue.watcher_recipients.include?(@user.mail)
71 assert !@issue.watcher_recipients.include?(@user.mail)
72 72 end
73 73
74 74 def test_unwatch
@@ -58,6 +58,7 module Redmine
58 58 # Returns an array of watchers' email addresses
59 59 def watcher_recipients
60 60 notified = watcher_users.active
61 notified.reject! {|user| user.mail_notification == 'none'}
61 62
62 63 if respond_to?(:visible?)
63 64 notified.reject! {|user| !visible?(user)}
General Comments 0
You need to be logged in to leave comments. Login now