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/services/projects/operations/update_service_spec.rb')
-rw-r--r--spec/services/projects/operations/update_service_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/services/projects/operations/update_service_spec.rb b/spec/services/projects/operations/update_service_spec.rb
index f91f879b772..1d9d5f6e938 100644
--- a/spec/services/projects/operations/update_service_spec.rb
+++ b/spec/services/projects/operations/update_service_spec.rb
@@ -262,6 +262,31 @@ RSpec.describe Projects::Operations::UpdateService do
expect(project.error_tracking_setting.previous_changes.keys)
.to contain_exactly('enabled')
end
+
+ context 'with integrated attribute' do
+ let(:params) do
+ {
+ error_tracking_setting_attributes: {
+ enabled: true,
+ integrated: true
+ }
+ }
+ end
+
+ it 'updates integrated attribute' do
+ expect { result }
+ .to change { project.reload.error_tracking_setting.integrated }
+ .from(false)
+ .to(true)
+ end
+
+ it 'only updates enabled and integrated attributes' do
+ result
+
+ expect(project.error_tracking_setting.previous_changes.keys)
+ .to contain_exactly('enabled', 'integrated')
+ end
+ end
end
context 'without setting' do