summaryrefslogtreecommitdiff
path: root/spec/controllers/groups/shared_projects_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/groups/shared_projects_controller_spec.rb')
-rw-r--r--spec/controllers/groups/shared_projects_controller_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/controllers/groups/shared_projects_controller_spec.rb b/spec/controllers/groups/shared_projects_controller_spec.rb
index d8fa41abb18..003c8c262e7 100644
--- a/spec/controllers/groups/shared_projects_controller_spec.rb
+++ b/spec/controllers/groups/shared_projects_controller_spec.rb
@@ -38,7 +38,7 @@ describe Groups::SharedProjectsController do
end
it 'allows filtering shared projects' do
- project = create(:project, :archived, namespace: user.namespace, name: "Searching for")
+ project = create(:project, namespace: user.namespace, name: "Searching for")
share_project(project)
get_shared_projects(filter: 'search')
@@ -55,5 +55,14 @@ describe Groups::SharedProjectsController do
expect(json_project_ids).to eq([second_project.id, shared_project.id])
end
+
+ it 'does not include archived projects' do
+ archived_project = create(:project, :archived, namespace: user.namespace)
+ share_project(archived_project)
+
+ get_shared_projects
+
+ expect(json_project_ids).to contain_exactly(shared_project.id)
+ end
end
end