diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-10 19:44:45 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-10 19:44:45 +0000 |
commit | 41f8d043eb29452ff11baf5e5286cd907cda742e (patch) | |
tree | 6d66e1b4d7ea8f8c312ce3ab551d9e7704d7164a /test/object_daddy_helpers.rb | |
parent | 109b42f4828c0966e771809afcfd99d545af3ca0 (diff) | |
download | redmine-41f8d043eb29452ff11baf5e5286cd907cda742e.tar.gz redmine-41f8d043eb29452ff11baf5e5286cd907cda742e.zip |
Added a "Member of Role" to the issues filters. #5869
This filter will check an issue's assigned to field for users who have
(or don't have) a specific Role(s).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4078 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/object_daddy_helpers.rb')
-rw-r--r-- | test/object_daddy_helpers.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/object_daddy_helpers.rb b/test/object_daddy_helpers.rb index 7b144b18f..c94ada229 100644 --- a/test/object_daddy_helpers.rb +++ b/test/object_daddy_helpers.rb @@ -13,6 +13,11 @@ module ObjectDaddyHelpers User.spawn(attributes) end + def User.add_to_project(user, project, roles) + roles = [roles] unless roles.is_a?(Array) + Member.generate!(:principal => user, :project => project, :roles => roles) + end + # Generate the default Query def Query.generate_default!(attributes={}) query = Query.spawn(attributes) |