summaryrefslogtreecommitdiff
path: root/spec/services/ci/retry_build_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/ci/retry_build_service_spec.rb')
-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