summaryrefslogtreecommitdiff
path: root/spec/views/search/_results.html.haml_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 07:08:36 +0000
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /spec/views/search/_results.html.haml_spec.rb
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
downloadgitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'spec/views/search/_results.html.haml_spec.rb')
-rw-r--r--spec/views/search/_results.html.haml_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/views/search/_results.html.haml_spec.rb b/spec/views/search/_results.html.haml_spec.rb
index 9e95dc40ff8..033b2304e33 100644
--- a/spec/views/search/_results.html.haml_spec.rb
+++ b/spec/views/search/_results.html.haml_spec.rb
@@ -60,6 +60,28 @@ RSpec.describe 'search/_results' do
expect(rendered).to have_selector('#js-search-filter-by-state')
end
+
+ context 'Feature search_filter_by_confidential' do
+ context 'when disabled' do
+ before do
+ stub_feature_flags(search_filter_by_confidential: false)
+ end
+
+ it 'does not render the confidential drop down' do
+ render
+
+ expect(rendered).not_to have_selector('#js-search-filter-by-confidential')
+ end
+ end
+
+ context 'when enabled' do
+ it 'renders the confidential drop down' do
+ render
+
+ expect(rendered).to have_selector('#js-search-filter-by-confidential')
+ end
+ end
+ end
end
end
end