debian-mirror-gitlab/spec/views/projects/settings/operations/show.html.haml_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.3 KiB
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe 'projects/settings/operations/show' do
let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) }
2021-01-03 14:25:43 +05:30
let_it_be(:error_tracking_setting) do
create(:project_error_tracking_setting, project: project)
end
2021-09-30 23:02:18 +05:30
let_it_be(:prometheus_integration) { create(:prometheus_integration, project: project) }
2019-02-15 15:39:39 +05:30
2021-01-03 14:25:43 +05:30
before_all do
2021-01-29 00:20:46 +05:30
project.add_maintainer(user)
2021-01-03 14:25:43 +05:30
end
2019-02-15 15:39:39 +05:30
before do
assign :project, project
2021-01-03 14:25:43 +05:30
allow(view).to receive(:error_tracking_setting)
.and_return(error_tracking_setting)
2021-09-30 23:02:18 +05:30
allow(view).to receive(:prometheus_integration)
.and_return(prometheus_integration)
2021-01-03 14:25:43 +05:30
allow(view).to receive(:current_user).and_return(user)
2019-02-15 15:39:39 +05:30
end
2021-03-08 18:12:59 +05:30
describe 'Operations > Alerts' do
it 'renders the Operations Settings page' do
render
2021-09-04 01:27:46 +05:30
expect(rendered).to have_content _('Alerts')
2021-04-29 21:17:54 +05:30
expect(rendered).to have_content _('Display alerts from all configured monitoring tools.')
2021-03-08 18:12:59 +05:30
end
end
2019-02-15 15:39:39 +05:30
describe 'Operations > Error Tracking' do
2021-01-03 14:25:43 +05:30
context 'Settings page ' do
it 'renders the Operations Settings page' do
2021-03-08 18:12:59 +05:30
render
2019-02-15 15:39:39 +05:30
2021-01-03 14:25:43 +05:30
expect(rendered).to have_content _('Error tracking')
2021-06-08 01:23:25 +05:30
expect(rendered).to have_content _('Link Sentry to GitLab to discover and view the errors your application generates.')
2021-01-03 14:25:43 +05:30
end
2019-02-15 15:39:39 +05:30
end
2021-01-03 14:25:43 +05:30
end
2019-02-15 15:39:39 +05:30
end