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:
authorDavid Palubin <dpalubin@gmail.com>2019-09-11 01:41:21 +0300
committerMayra Cabrera <mcabrera@gitlab.com>2019-09-11 01:41:21 +0300
commite915ee33839ce74c637a8614f12b5eeb56a2e261 (patch)
treed37471c358edecccfd865961432939e0d7a0c70f /spec/services/search
parentae69bdeaed03e42dcabda558c209706bd051a0d4 (diff)
Prevent archived projects from showing up in global search
Diffstat (limited to 'spec/services/search')
-rw-r--r--spec/services/search/global_service_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/services/search/global_service_spec.rb b/spec/services/search/global_service_spec.rb
index 62a70ccd3da..0f829df90b3 100644
--- a/spec/services/search/global_service_spec.rb
+++ b/spec/services/search/global_service_spec.rb
@@ -42,6 +42,14 @@ describe Search::GlobalService do
expect(results.objects('projects')).to match_array [found_project]
end
+
+ it 'does not return archived projects' do
+ archived_project = create(:project, :public, archived: true, name: 'archived_project')
+
+ results = described_class.new(user, search: "archived").execute
+
+ expect(results.objects('projects')).not_to include(archived_project)
+ end
end
end
end