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:
authorShinya Maeda <shinya@gitlab.com>2017-09-06 17:09:41 +0300
committerShinya Maeda <shinya@gitlab.com>2017-09-06 17:09:41 +0300
commitf7da15bae3e41e1a3fe30918887928c8908ccbe3 (patch)
tree98a1eb2ab8b5cf92cf02d2c3ca1cd58c8a83e315 /spec/services
parentd68ff7f50a93ebbff537b5e795cf6bf80bd66a6e (diff)
Use before_save :set_protected
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..f0eb700d342 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).not_to be_nil
+ expect(new_build.protected).to eq build.protected
+ end
+ end
end
describe 'reject acessors' do