summaryrefslogtreecommitdiffstats
path: root/test/unit/user_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-12-10 12:02:37 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-12-10 12:02:37 +0000
commit3a2b6c7c9653ddbd32ea0c2434b0c9b638832b3e (patch)
treed26c2e0017af9ba1ce3a8767c9dc2f2584a0f776 /test/unit/user_test.rb
parent575f4032a221c8fc7919c2997c13e1424da8006e (diff)
downloadredmine-3a2b6c7c9653ddbd32ea0c2434b0c9b638832b3e.tar.gz
redmine-3a2b6c7c9653ddbd32ea0c2434b0c9b638832b3e.zip
Enforce issue assignee validation (#23921).
git-svn-id: http://svn.redmine.org/redmine/trunk@16055 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/user_test.rb')
-rw-r--r--test/unit/user_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index ff513a276..d39694e94 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -1140,6 +1140,7 @@ class UserTest < ActiveSupport::TestCase
project = Project.find(1)
author = User.generate!
assignee = User.generate!
+ Member.create!(:user => assignee, :project => project, :role_ids => [1])
member = User.generate!
Member.create!(:user => member, :project => project, :role_ids => [1])
issue = Issue.generate!(:project => project, :assigned_to => assignee, :author => author)
@@ -1160,7 +1161,9 @@ class UserTest < ActiveSupport::TestCase
def test_notify_about_issue_for_previous_assignee
assignee = User.generate!(:mail_notification => 'only_assigned')
+ Member.create!(:user => assignee, :project_id => 1, :role_ids => [1])
new_assignee = User.generate!(:mail_notification => 'only_assigned')
+ Member.create!(:user => new_assignee, :project_id => 1, :role_ids => [1])
issue = Issue.generate!(:assigned_to => assignee)
assert assignee.notify_about?(issue)