Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/finders/projects_finder_spec.rb')
-rw-r--r--spec/finders/projects_finder_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/finders/projects_finder_spec.rb b/spec/finders/projects_finder_spec.rb
index f7afd96fa09..e570b49e1da 100644
--- a/spec/finders/projects_finder_spec.rb
+++ b/spec/finders/projects_finder_spec.rb
@@ -482,6 +482,19 @@ RSpec.describe ProjectsFinder, feature_category: :groups_and_projects do
it { is_expected.to match_array([internal_project]) }
end
+ describe 'filter by organization_id' do
+ let_it_be(:organization) { create(:organization) }
+ let_it_be(:organization_project) { create(:project, organization: organization) }
+
+ let(:params) { { organization_id: organization.id } }
+
+ before do
+ organization_project.add_maintainer(current_user)
+ end
+
+ it { is_expected.to match_array([organization_project]) }
+ end
+
describe 'when with_issues_enabled is true' do
let(:params) { { with_issues_enabled: true } }