diff options
Diffstat (limited to 'spec/views/profiles/preferences/show.html.haml_spec.rb')
-rw-r--r-- | spec/views/profiles/preferences/show.html.haml_spec.rb | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/spec/views/profiles/preferences/show.html.haml_spec.rb b/spec/views/profiles/preferences/show.html.haml_spec.rb index aab50209953..2fe941b9f14 100644 --- a/spec/views/profiles/preferences/show.html.haml_spec.rb +++ b/spec/views/profiles/preferences/show.html.haml_spec.rb @@ -68,61 +68,4 @@ RSpec.describe 'profiles/preferences/show' do expect(rendered).to have_css('#localization') end end - - context 'sourcegraph' do - def have_sourcegraph_field(*args) - have_field('user_sourcegraph_enabled', *args) - end - - def have_integrations_section - have_css('#integrations.profile-settings-sidebar', text: 'Integrations') - end - - before do - stub_feature_flags(sourcegraph: sourcegraph_feature) - stub_application_setting(sourcegraph_enabled: sourcegraph_enabled) - end - - context 'when not fully enabled' do - where(:feature, :admin_enabled) do - false | false - false | true - true | false - end - - with_them do - let(:sourcegraph_feature) { feature } - let(:sourcegraph_enabled) { admin_enabled } - - before do - render - end - - it 'does not display sourcegraph field' do - expect(rendered).not_to have_sourcegraph_field - end - - it 'does not display Integration Settings' do - expect(rendered).not_to have_integrations_section - end - end - end - - context 'when fully enabled' do - let(:sourcegraph_feature) { true } - let(:sourcegraph_enabled) { true } - - before do - render - end - - it 'displays the sourcegraph field' do - expect(rendered).to have_sourcegraph_field - end - - it 'displays the integrations section' do - expect(rendered).to have_integrations_section - end - end - end end |