diff options
author | David Palubin <dpalubin@gmail.com> | 2019-09-11 01:41:21 +0300 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-09-11 01:41:21 +0300 |
commit | e915ee33839ce74c637a8614f12b5eeb56a2e261 (patch) | |
tree | d37471c358edecccfd865961432939e0d7a0c70f /spec/services | |
parent | ae69bdeaed03e42dcabda558c209706bd051a0d4 (diff) |
Prevent archived projects from showing up in global search
Diffstat (limited to 'spec/services')
-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 |