Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/api/error_tracking_spec.rb')
-rw-r--r--spec/requests/api/error_tracking_spec.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/requests/api/error_tracking_spec.rb b/spec/requests/api/error_tracking_spec.rb
index 39121af7bc3..ec9a3378acc 100644
--- a/spec/requests/api/error_tracking_spec.rb
+++ b/spec/requests/api/error_tracking_spec.rb
@@ -17,7 +17,8 @@ RSpec.describe API::ErrorTracking do
'active' => setting.reload.enabled,
'project_name' => setting.project_name,
'sentry_external_url' => setting.sentry_external_url,
- 'api_url' => setting.api_url
+ 'api_url' => setting.api_url,
+ 'integrated' => setting.integrated
)
end
end
@@ -79,6 +80,19 @@ RSpec.describe API::ErrorTracking do
.to eq('active is empty')
end
end
+
+ context 'with integrated param' do
+ let(:params) { { active: true, integrated: true } }
+
+ it 'updates the integrated flag' do
+ expect(setting.integrated).to be_falsey
+
+ make_request
+
+ expect(json_response).to include('integrated' => true)
+ expect(setting.reload.integrated).to be_truthy
+ end
+ end
end
context 'without a project setting' do