diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-05-12 19:04:52 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-05-12 19:04:52 +0000 |
commit | da2854cf750b2a848a250491aac17751cb596182 (patch) | |
tree | 4d50138bda5c2ab7b1c9944077a220eafd689b7f /test/unit/project_test.rb | |
parent | 3df4df3438f32e302cb45f6bc77c4eb1bc8b98e8 (diff) | |
download | redmine-da2854cf750b2a848a250491aac17751cb596182.tar.gz redmine-da2854cf750b2a848a250491aac17751cb596182.zip |
Display all users roles on project overview (#3339).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2734 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_test.rb')
-rw-r--r-- | test/unit/project_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb index 4ecd9d4a8..1ea5c1982 100644 --- a/test/unit/project_test.rb +++ b/test/unit/project_test.rb @@ -186,6 +186,14 @@ class ProjectTest < Test::Unit::TestCase assert_equal [5, 6, 3, 4], d.collect(&:id)
end
+ def test_users_by_role
+ users_by_role = Project.find(1).users_by_role
+ assert_kind_of Hash, users_by_role
+ role = Role.find(1)
+ assert_kind_of Array, users_by_role[role]
+ assert users_by_role[role].include?(User.find(2))
+ end
+
def test_rolled_up_trackers
parent = Project.find(1)
parent.trackers = Tracker.find([1,2])
|