diff options
Diffstat (limited to 'spec/services/search')
-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 |