diff options
author | Go MAEDA <maeda@farend.jp> | 2021-07-27 04:57:38 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-07-27 04:57:38 +0000 |
commit | ea05f03348923d7edb02713f8c5cdc5f92d7bf13 (patch) | |
tree | bee4de33e917c3b63f1b42a41e55c3e0c20881a1 /test | |
parent | ea9b7159da2e764d8c780c3aab77368e2771c357 (diff) | |
download | redmine-ea05f03348923d7edb02713f8c5cdc5f92d7bf13.tar.gz redmine-ea05f03348923d7edb02713f8c5cdc5f92d7bf13.zip |
Merged r21090 from trunk to 4.2-stable (#35606).
git-svn-id: http://svn.redmine.org/redmine/branches/4.2-stable@21091 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/project_test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb index f15fc937a..35a5ef858 100644 --- a/test/unit/project_test.rb +++ b/test/unit/project_test.rb @@ -475,6 +475,16 @@ class ProjectTest < ActiveSupport::TestCase assert principals_by_role[role].include?(group) end + def test_principals_by_role_should_only_return_active_users + #group = Group.find(10) + #Member.create!(:principal => group, :project_id => 1, :role_ids => [1]) + + principals_by_role = Project.find(1).principals_by_role + locked_user = User.find(5) + assert Project.find(1).memberships.map(&:principal).include?(locked_user) + assert_not principals_by_role.values.flatten.include?(locked_user) + end + def test_rolled_up_trackers parent = Project.find(1) parent.trackers = Tracker.find([1, 2]) |