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 user count is scope specific

Aaron Contreras0d929179dc12
diff --git a/spec/support/api/v3/shared_available_principals_examples.rb b/spec/support/api/v3/shared_available_principals_examples.rb
index 87a1da5df53..deafe4e2d1c 100644
--- a/spec/support/api/v3/shared_available_principals_examples.rb
+++ b/spec/support/api/v3/shared_available_principals_examples.rb
@@ -81,7 +81,11 @@ RSpec.shared_examples_for 'available principals' do |principals, work_package_sc
# and the current user
end
- it_behaves_like "returns available #{principals}", 3, 3, 'User'
+ if work_package_scope
+ it_behaves_like "returns available #{principals}", 3, 3, 'User'
+ else
+ it_behaves_like "returns available #{principals}", 2, 2, 'User'
+ end
end
context 'if the user lacks the assignable permission' do