Commit e13753fc authored by Bob Van Landuyt's avatar Bob Van Landuyt
Browse files

Only take unarchived projects into account

When finding children for a group
parent 48d35c4e84de
......@@ -6,7 +6,7 @@ class GroupDescendantsFinder
def initialize(current_user: nil, parent_group:, params: {})
@current_user = current_user
@parent_group = parent_group
@params = params
@params = params.reverse_merge(non_archived: true)
def execute
......@@ -74,7 +74,7 @@ def direct_child_projects
def projects_matching_filter current_user).execute current_user, params: params).execute
.where(namespace: all_descendant_groups)
......@@ -19,6 +19,12 @@
expect(finder.execute).to contain_exactly(project)
it 'does not include archived projects' do
_archived_project = create(:project, :archived, namespace: group)
expect(finder.execute).to be_empty
context 'with a filter' do
let(:params) { { filter: 'test' } }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment