summaryrefslogtreecommitdiff
path: root/spec/views
diff options
context:
space:
mode:
authorTristan Read <tread@gitlab.com>2018-12-13 16:55:43 +0100
committerPeter Leitzen <pleitzen@gitlab.com>2019-01-07 19:09:49 +0100
commit7380ed309a14bfcaa9a0fc87433e50c01c8b43fd (patch)
treed2a9613bc3c9beb056cfc10f3aa0d4eafba076c6 /spec/views
parent0c1d6be13cb52afb32d23d625a6400e28f0a991e (diff)
downloadgitlab-ce-7380ed309a14bfcaa9a0fc87433e50c01c8b43fd.tar.gz
Add view and feature test for error tracking settings
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/projects/settings/operations/show.html.haml_spec.rb39
1 files changed, 39 insertions, 0 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
new file mode 100644
index 00000000000..752fd82c5e8
--- /dev/null
+++ b/spec/views/projects/settings/operations/show.html.haml_spec.rb
@@ -0,0 +1,39 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+require 'rails_helper'
+
+describe 'projects/settings/operations/show' do
+ let(:project) { create(:project) }
+ let(:user) { create(:user) }
+
+ before do
+ assign :project, project
+ end
+
+ describe 'Operations > Error Tracking' do
+ before do
+ stub_feature_flags(error_tracking: true)
+
+ 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)
+ end
+
+ let!(:error_tracking_setting) do
+ create(:project_error_tracking_setting, project: project)
+ end
+
+ context 'Settings page ' do
+ it 'renders the Operations Settings page' do
+ render
+
+ expect(rendered).to have_content _('Error Tracking')
+ expect(rendered).to have_content _('To link Sentry to GitLab, enter your Sentry URL and Auth Token')
+ expect(rendered).to have_content _('Active')
+ end
+ end
+ end
+end