diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-23 15:09:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-09-23 15:09:58 +0300 |
commit | a071c2888d62f7a56349e99f5c070407df2e17c1 (patch) | |
tree | 47e5d2cb95920a1e28348c3af5a3d9987c2805c2 /spec/views | |
parent | 8f2b51af416f4f4451632f6b3c2ada52c52eb44f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/search/_results.html.haml_spec.rb | 22 |
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 |