Fix spec
This commit is contained in:
parent
ce7c0ac3db
commit
5547baa3eb
|
@ -26,7 +26,7 @@ module Ci
|
|||
|
||||
validates :coverage, numericality: true, allow_blank: true
|
||||
validates :ref, presence: true
|
||||
validates :protected, inclusion: { in: [ true, false ] }, on: :create
|
||||
validates :protected, inclusion: { in: [true, false] }, on: :create
|
||||
|
||||
scope :unstarted, ->() { where(runner_id: nil) }
|
||||
scope :ignore_failures, ->() { where(allow_failure: false) }
|
||||
|
|
|
@ -36,7 +36,7 @@ module Ci
|
|||
validates :sha, presence: { unless: :importing? }
|
||||
validates :ref, presence: { unless: :importing? }
|
||||
validates :status, presence: { unless: :importing? }
|
||||
validates :protected, inclusion: { in: [ true, false ], unless: :importing? }, on: :create
|
||||
validates :protected, inclusion: { in: [true, false], unless: :importing? }, on: :create
|
||||
validate :valid_commit_sha, unless: :importing?
|
||||
|
||||
after_create :keep_around_commits, unless: :importing?
|
||||
|
|
|
@ -80,7 +80,8 @@ module CycleAnalyticsHelpers
|
|||
sha: project.repository.commit('master').sha,
|
||||
ref: 'master',
|
||||
source: :push,
|
||||
project: project)
|
||||
project: project,
|
||||
protected: true)
|
||||
end
|
||||
|
||||
def new_dummy_job(environment)
|
||||
|
@ -93,7 +94,8 @@ module CycleAnalyticsHelpers
|
|||
ref: 'master',
|
||||
tag: false,
|
||||
name: 'dummy',
|
||||
pipeline: dummy_pipeline)
|
||||
pipeline: dummy_pipeline,
|
||||
protected: true)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue