Commit af2c4ab9 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Upsert pending build using protected attribute

parent 8498d108
......@@ -8,7 +8,7 @@ module Ci
belongs_to :build, class_name: 'Ci::Build'
def self.upsert_from_build!(build)
entry = self.new(build: build, project: build.project)
entry = self.new(build: build, project: build.project, protected: build.protected?)
entry.validate!
......
......@@ -20,7 +20,7 @@ RSpec.describe Ci::PendingBuild do
context 'when another queuing entry exists for given build' do
before do
described_class.create!(build: build, project: project)
described_class.create!(build: build, project: project, protected: false)
end
it 'returns a build id as a result' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment