diff options
Diffstat (limited to 'spec/views/projects/settings/operations/show.html.haml_spec.rb')
-rw-r--r-- | spec/views/projects/settings/operations/show.html.haml_spec.rb | 40 |
1 files changed, 5 insertions, 35 deletions
diff --git a/spec/views/projects/settings/operations/show.html.haml_spec.rb b/spec/views/projects/settings/operations/show.html.haml_spec.rb index ab868eb78b8..43c064e1a2b 100644 --- a/spec/views/projects/settings/operations/show.html.haml_spec.rb +++ b/spec/views/projects/settings/operations/show.html.haml_spec.rb @@ -36,7 +36,7 @@ RSpec.describe 'projects/settings/operations/show' do it 'renders the Operations Settings page' do render - expect(rendered).to have_content _('Alert integrations') + expect(rendered).to have_content _('Alerts') expect(rendered).to have_content _('Display alerts from all configured monitoring tools.') end end @@ -59,7 +59,7 @@ RSpec.describe 'projects/settings/operations/show' do expect(rendered).to have_content _('Prometheus') expect(rendered).to have_content _('Link Prometheus monitoring to GitLab.') - expect(rendered).to have_content _('To enable the installation of Prometheus on your clusters, deactivate the manual configuration.') + expect(rendered).to have_content _('To use a Prometheus installed on a cluster, deactivate the manual configuration.') end end @@ -77,41 +77,11 @@ RSpec.describe 'projects/settings/operations/show' do end describe 'Operations > Tracing' do - context 'with project.tracing_external_url' do - it 'links to project.tracing_external_url' do - render - - expect(rendered).to have_link('Tracing', href: tracing_setting.external_url) - end - - context 'with malicious external_url' do - let(:malicious_tracing_url) { "https://replaceme.com/'><script>alert(document.cookie)</script>" } - let(:cleaned_url) { "https://replaceme.com/'>" } - - before do - tracing_setting.update_column(:external_url, malicious_tracing_url) - end - - it 'sanitizes external_url' do - render - - expect(tracing_setting.external_url).to eq(malicious_tracing_url) - expect(rendered).to have_link('Tracing', href: cleaned_url) - end - end - end - - context 'without project.tracing_external_url' do - let(:tracing_setting) { build(:project_tracing_setting, project: project) } - - before do - tracing_setting.external_url = nil - end - - it 'links to Tracing page' do + context 'Settings page ' do + it 'renders the Tracing Settings page' do render - expect(rendered).to have_link('Tracing', href: project_tracing_path(project)) + expect(rendered).to have_content _('Embed an image of your existing Jaeger server in GitLab.') end end end |