diff options
author | David Palubin <dpalubin@gmail.com> | 2019-09-10 22:41:21 +0000 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-09-10 22:41:21 +0000 |
commit | e915ee33839ce74c637a8614f12b5eeb56a2e261 (patch) | |
tree | d37471c358edecccfd865961432939e0d7a0c70f /spec | |
parent | ae69bdeaed03e42dcabda558c209706bd051a0d4 (diff) | |
download | gitlab-ce-e915ee33839ce74c637a8614f12b5eeb56a2e261.tar.gz |
Prevent archived projects from showing up in global search
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/search/global_service_spec.rb | 8 |
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 |