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-06-07 09:08:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-06-07 09:08:42 +0300
commit02b949f3b64f88e97abec62c355ca1b1da2bd460 (patch)
treefffb942e5c6b9f19d3903a709172423595308643 /spec/helpers
parent3e59f1f11a387ab3e0383f7beea8ea599291a293 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/search_helper_spec.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb
index c0f129cefc3..bbc07e91728 100644
--- a/spec/helpers/search_helper_spec.rb
+++ b/spec/helpers/search_helper_spec.rb
@@ -60,7 +60,7 @@ RSpec.describe SearchHelper, feature_category: :global_search do
expect(search_autocomplete_opts(project.name).size).to eq(1)
end
- context 'for users' do
+ shared_examples 'for users' do
let_it_be(:another_user) { create(:user, name: 'Jane Doe') }
let(:term) { 'jane' }
@@ -153,6 +153,16 @@ RSpec.describe SearchHelper, feature_category: :global_search do
end
end
+ [true, false].each do |enabled|
+ context "with feature flag autcomplete_users_use_search_service #{enabled}" do
+ before do
+ stub_feature_flags(autocomplete_users_use_search_service: enabled)
+ end
+
+ include_examples 'for users'
+ end
+ end
+
it "includes the required project attrs" do
project = create(:project, namespace: create(:namespace, owner: user))
result = search_autocomplete_opts(project.name).first