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

44 lines
1.2 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) }
let(:operations_show_locals) do
{
prometheus_service: project.find_or_initialize_service('prometheus'),
alerts_service: project.find_or_initialize_service('alerts')
}
end
2019-02-15 15:39:39 +05:30
before do
assign :project, project
end
describe 'Operations > Error Tracking' do
before do
project.add_reporter(user)
allow(view).to receive(:error_tracking_setting)
.and_return(error_tracking_setting)
allow(view).to receive(:current_user).and_return(user)
2019-07-07 11:18:12 +05:30
allow(view).to receive(:incident_management_available?) { false }
2019-02-15 15:39:39 +05:30
end
2020-07-28 23:09:34 +05:30
let_it_be(:error_tracking_setting) do
2019-02-15 15:39:39 +05:30
create(:project_error_tracking_setting, project: project)
end
context 'Settings page ' do
it 'renders the Operations Settings page' do
2020-07-28 23:09:34 +05:30
render template: 'projects/settings/operations/show', locals: operations_show_locals
2019-02-15 15:39:39 +05:30
expect(rendered).to have_content _('Error Tracking')
expect(rendered).to have_content _('To link Sentry to GitLab, enter your Sentry URL and Auth Token')
end
end
end
end