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:
Diffstat (limited to 'spec/finders/issues_finder_spec.rb')
-rw-r--r--spec/finders/issues_finder_spec.rb28
1 files changed, 7 insertions, 21 deletions
diff --git a/spec/finders/issues_finder_spec.rb b/spec/finders/issues_finder_spec.rb
index 303bfc59f61..28764f98fe1 100644
--- a/spec/finders/issues_finder_spec.rb
+++ b/spec/finders/issues_finder_spec.rb
@@ -1004,36 +1004,22 @@ RSpec.describe IssuesFinder do
end
end
- context 'when attempt_group_search_optimizations is unset and attempt_project_search_optimizations is set' do
- let(:params) { { search: 'foo', attempt_project_search_optimizations: true } }
-
- context 'and the corresponding feature flag is disabled' do
- before do
- stub_feature_flags(attempt_project_search_optimizations: false)
- end
+ context 'when all conditions are met' do
+ context "uses group search optimization" do
+ let(:params) { { search: 'foo', attempt_group_search_optimizations: true } }
- it 'returns false' do
- expect(finder.use_cte_for_search?).to be_falsey
+ it 'returns true' do
+ expect(finder.use_cte_for_search?).to be_truthy
end
end
- context 'and the corresponding feature flag is enabled' do
- before do
- stub_feature_flags(attempt_project_search_optimizations: true)
- end
+ context "uses project search optimization" do
+ let(:params) { { search: 'foo', attempt_project_search_optimizations: true } }
it 'returns true' do
expect(finder.use_cte_for_search?).to be_truthy
end
end
end
-
- context 'when all conditions are met' do
- let(:params) { { search: 'foo', attempt_group_search_optimizations: true } }
-
- it 'returns true' do
- expect(finder.use_cte_for_search?).to be_truthy
- end
- end
end
end