Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Ensure locked users are not returned

Aaron Contreras5ccea1c653f1
diff --git a/spec/models/principals/scopes/possible_assignee_spec.rb b/spec/models/principals/scopes/possible_assignee_spec.rb
index 296a2e3b427..cf32bc50023 100644
--- a/spec/models/principals/scopes/possible_assignee_spec.rb
+++ b/spec/models/principals/scopes/possible_assignee_spec.rb
@@ -161,6 +161,15 @@ RSpec.describe Principals::Scopes::PossibleAssignee do
.to contain_exactly(member_user, member_placeholder_user, member_group)
end
end
+
+ context 'with the user status being locked' do
+ let(:user_status) { :locked }
+
+ it 'returns non locked users, groups and placeholder users that are members' do
+ expect(subject)
+ .to contain_exactly(member_placeholder_user, member_group)
+ end
+ end
end
end