diff options
Diffstat (limited to 'spec/views/admin/application_settings')
-rw-r--r-- | spec/views/admin/application_settings/_jira_connect.html.haml_spec.rb | 23 | ||||
-rw-r--r-- | spec/views/admin/application_settings/general.html.haml_spec.rb | 10 |
2 files changed, 28 insertions, 5 deletions
diff --git a/spec/views/admin/application_settings/_jira_connect.html.haml_spec.rb b/spec/views/admin/application_settings/_jira_connect.html.haml_spec.rb new file mode 100644 index 00000000000..7cfc2db5a41 --- /dev/null +++ b/spec/views/admin/application_settings/_jira_connect.html.haml_spec.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe 'admin/application_settings/_jira_connect.html.haml' do + let_it_be(:admin) { create(:admin) } + let(:application_setting) { build(:application_setting) } + + before do + assign(:application_setting, application_setting) + allow(view).to receive(:expanded).and_return(true) + end + + it 'renders the application ID field' do + render + expect(rendered).to have_field('Jira Connect Application ID', type: 'text') + end + + it 'renders the asymmetric jwt cdn url field' do + render + expect(rendered).to have_field('Jira Connect Proxy URL', type: 'text') + end +end diff --git a/spec/views/admin/application_settings/general.html.haml_spec.rb b/spec/views/admin/application_settings/general.html.haml_spec.rb index c7d156cde39..a8c7bec36e3 100644 --- a/spec/views/admin/application_settings/general.html.haml_spec.rb +++ b/spec/views/admin/application_settings/general.html.haml_spec.rb @@ -69,19 +69,19 @@ RSpec.describe 'admin/application_settings/general.html.haml' do end end - describe 'jira connect application key' do - it 'shows the jira connect application key section' do + describe 'jira connect settings' do + it 'shows the jira connect settings section' do render expect(rendered).to have_css('#js-jira_connect-settings') end - context 'when the jira_connect_oauth feature flag is disabled' do + context 'when the jira_connect_oauth_self_managed_setting feature flag is disabled' do before do - stub_feature_flags(jira_connect_oauth: false) + stub_feature_flags(jira_connect_oauth_self_managed_setting: false) end - it 'does not show the jira connect application key section' do + it 'does not show the jira connect settings section' do render expect(rendered).not_to have_css('#js-jira_connect-settings') |