diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-20 15:40:28 +0000 |
commit | b595cb0c1dec83de5bdee18284abe86614bed33b (patch) | |
tree | 8c3d4540f193c5ff98019352f554e921b3a41a72 /spec/views/admin | |
parent | 2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff) | |
download | gitlab-ce-b595cb0c1dec83de5bdee18284abe86614bed33b.tar.gz |
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'spec/views/admin')
-rw-r--r-- | spec/views/admin/application_settings/general.html.haml_spec.rb | 31 |
1 files changed, 30 insertions, 1 deletions
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 3614090d3cb..c7d156cde39 100644 --- a/spec/views/admin/application_settings/general.html.haml_spec.rb +++ b/spec/views/admin/application_settings/general.html.haml_spec.rb @@ -3,7 +3,7 @@ require 'spec_helper' RSpec.describe 'admin/application_settings/general.html.haml' do - let(:app_settings) { build(:application_setting) } + let(:app_settings) { Gitlab::CurrentSettings.current_application_settings } let(:user) { create(:admin) } before do @@ -97,4 +97,33 @@ RSpec.describe 'admin/application_settings/general.html.haml' do expect(rendered).to match ' data-minimum-password-length=' end end + + describe 'error tracking integration' do + context 'with error tracking feature flag enabled' do + before do + stub_feature_flags(gitlab_error_tracking: true) + + render + end + + it 'expects error tracking settings to be available' do + expect(rendered).to have_field('application_setting_error_tracking_api_url') + end + + it 'expects display token and reset token to be available' do + expect(rendered).to have_content(app_settings.error_tracking_access_token) + expect(rendered).to have_button('Reset error tracking access token') + end + end + + context 'with error tracking feature flag disabled' do + it 'expects error tracking settings to not be avaiable' do + stub_feature_flags(gitlab_error_tracking: false) + + render + + expect(rendered).not_to have_field('application_setting_error_tracking_api_url') + end + end + end end |