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:
authorKamil Trzciński <ayufan@ayufan.eu>2017-09-06 21:26:22 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2017-09-06 21:26:22 +0300
commit0a8083c4f1605a17e52137c6da6d8748be1d98df (patch)
treee07dce12cd1ca89b9e404c4d3aee553362f97878 /spec/services
parentcc6f7b0b34d5d2be8445068a0620d0872003d85e (diff)
parent6c012c3b4c9a8b9a89c14403fc7f415c81b90722 (diff)
Merge branch 'fix/sm/33281-activerecord-recordinvalid-when-build-has-nil-protected' into 'master'
Fix 422 error when retry job Closes #33281 See merge request !14082
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/ci/retry_build_service_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/services/ci/retry_build_service_spec.rb b/spec/services/ci/retry_build_service_spec.rb
index f5ed9ff608f..bbc3a8c79f5 100644
--- a/spec/services/ci/retry_build_service_spec.rb
+++ b/spec/services/ci/retry_build_service_spec.rb
@@ -52,6 +52,17 @@ describe Ci::RetryBuildService do
expect(new_build.send(attribute)).to eq build.send(attribute)
end
end
+
+ context 'when job has nullified protected' do
+ before do
+ build.update_attribute(:protected, nil)
+ end
+
+ it "clones protected build attribute" do
+ expect(new_build.protected).to be_nil
+ expect(new_build.protected).to eq build.protected
+ end
+ end
end
describe 'reject acessors' do