Add validation Ci::Runner runner_type must be present
This commit is contained in:
parent
4c2cf90780
commit
89ec120f61
2 changed files with 2 additions and 0 deletions
|
@ -58,6 +58,7 @@ module Ci
|
|||
validate :tag_constraints
|
||||
validate :either_projects_or_group
|
||||
validates :access_level, presence: true
|
||||
validates :runner_type, presence: true
|
||||
|
||||
acts_as_taggable
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ require 'spec_helper'
|
|||
describe Ci::Runner do
|
||||
describe 'validation' do
|
||||
it { is_expected.to validate_presence_of(:access_level) }
|
||||
it { is_expected.to validate_presence_of(:runner_type) }
|
||||
|
||||
context 'when runner is not allowed to pick untagged jobs' do
|
||||
context 'when runner does not have tags' do
|
||||
|
|
Loading…
Reference in a new issue