Commit 89ec120f authored by Dylan Griffith's avatar Dylan Griffith

Add validation Ci::Runner runner_type must be present

parent 4c2cf907
...@@ -58,6 +58,7 @@ module Ci ...@@ -58,6 +58,7 @@ module Ci
validate :tag_constraints validate :tag_constraints
validate :either_projects_or_group validate :either_projects_or_group
validates :access_level, presence: true validates :access_level, presence: true
validates :runner_type, presence: true
acts_as_taggable acts_as_taggable
......
...@@ -3,6 +3,7 @@ require 'spec_helper' ...@@ -3,6 +3,7 @@ require 'spec_helper'
describe Ci::Runner do describe Ci::Runner do
describe 'validation' do describe 'validation' do
it { is_expected.to validate_presence_of(:access_level) } 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 is not allowed to pick untagged jobs' do
context 'when runner does not have tags' do context 'when runner does not have tags' 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