diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-23 17:55:29 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-23 17:55:29 +0000 |
commit | 22317105f99ef444dc6262c041bc464adc845933 (patch) | |
tree | ee4ba6cc41e3811c69fe759ef24b2bf89244c20a /test | |
parent | f2e7aa596b4e9676d40019afbbdce6e0d944f442 (diff) | |
download | redmine-22317105f99ef444dc6262c041bc464adc845933.tar.gz redmine-22317105f99ef444dc6262c041bc464adc845933.zip |
Notify previous assignee when assignee changes (#2694).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8695 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/issue_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb index 59dabba48..ee56ffe74 100644 --- a/test/unit/issue_test.rb +++ b/test/unit/issue_test.rb @@ -678,6 +678,18 @@ class IssueTest < ActiveSupport::TestCase end end + def test_recipients_should_include_previous_assignee + user = User.find(3) + user.members.update_all ["mail_notification = ?", false] + user.update_attribute :mail_notification, 'only_assigned' + + issue = Issue.find(2) + issue.assigned_to = nil + assert_include user.mail, issue.recipients + issue.save! + assert !issue.recipients.include?(user.mail) + end + def test_recipients_should_not_include_users_that_cannot_view_the_issue issue = Issue.find(12) assert issue.recipients.include?(issue.author.mail) |