diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-07 09:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-07 09:08:42 +0300 |
commit | 02b949f3b64f88e97abec62c355ca1b1da2bd460 (patch) | |
tree | fffb942e5c6b9f19d3903a709172423595308643 /spec/helpers | |
parent | 3e59f1f11a387ab3e0383f7beea8ea599291a293 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/search_helper_spec.rb | 12 |
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 |