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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-31 18:07:20 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-31 18:07:20 +0300
commitfab00cd7efb84b369dfb45cabb797f7feace4b66 (patch)
treefd3eb7509bf3947ddd818214350a06d16822c78a /spec/lib/gitlab/search_results_spec.rb
parent07f6ded1cb698550284e5f348de8f1b884e715ae (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/search_results_spec.rb')
-rw-r--r--spec/lib/gitlab/search_results_spec.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/lib/gitlab/search_results_spec.rb b/spec/lib/gitlab/search_results_spec.rb
index a38073e7c51..18b42da659b 100644
--- a/spec/lib/gitlab/search_results_spec.rb
+++ b/spec/lib/gitlab/search_results_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::SearchResults do
+RSpec.describe Gitlab::SearchResults, feature_category: :global_search do
include ProjectForksHelper
include SearchHelpers
using RSpec::Parameterized::TableSyntax
@@ -260,6 +260,19 @@ RSpec.describe Gitlab::SearchResults do
end
end
+ describe '#projects' do
+ let(:scope) { 'projects' }
+ let(:query) { 'Test' }
+
+ describe 'filtering' do
+ let_it_be(:group) { create(:group) }
+ let_it_be(:unarchived_project) { create(:project, :public, group: group, name: 'Test1') }
+ let_it_be(:archived_project) { create(:project, :archived, :public, group: group, name: 'Test2') }
+
+ it_behaves_like 'search results filtered by archived'
+ end
+ end
+
describe '#users' do
it 'does not call the UsersFinder when the current_user is not allowed to read users list' do
allow(Ability).to receive(:allowed?).and_return(false)