summaryrefslogtreecommitdiffstats
path: root/test/object_helpers.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-08-26 09:03:17 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-08-26 09:03:17 +0000
commit5969df81424968af69cc7b584242d48bf7d5c51e (patch)
tree88488b73617fc90f18871cc2a622306f95ee4854 /test/object_helpers.rb
parent2ed4364c8a15b9f557bf349894395f83955e9934 (diff)
downloadredmine-5969df81424968af69cc7b584242d48bf7d5c51e.tar.gz
redmine-5969df81424968af69cc7b584242d48bf7d5c51e.zip
MailHandler: Match assignee on the full display name (#11552).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10236 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/object_helpers.rb')
-rw-r--r--test/object_helpers.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/object_helpers.rb b/test/object_helpers.rb
index 85c6d139c..42dfdecda 100644
--- a/test/object_helpers.rb
+++ b/test/object_helpers.rb
@@ -12,7 +12,8 @@ module ObjectHelpers
user
end
- def User.add_to_project(user, project, roles)
+ def User.add_to_project(user, project, roles=nil)
+ roles = Role.find(1) if roles.nil?
roles = [roles] unless roles.is_a?(Array)
Member.create!(:principal => user, :project => project, :roles => roles)
end