Commit b1250065 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Do not enforce using a hash with hidden ci key

parent 68b3c8c2
...@@ -9,7 +9,6 @@ module Gitlab ...@@ -9,7 +9,6 @@ module Gitlab
include Validatable include Validatable
validations do validations do
validates :config, type: Hash
validates :config, presence: true validates :config, presence: true
end end
......
...@@ -5,11 +5,11 @@ describe Gitlab::Ci::Config::Node::HiddenJob do ...@@ -5,11 +5,11 @@ describe Gitlab::Ci::Config::Node::HiddenJob do
describe 'validations' do describe 'validations' do
context 'when entry config value is correct' do context 'when entry config value is correct' do
let(:config) { { image: 'ruby:2.2' } } let(:config) { [:some, :array] }
describe '#value' do describe '#value' do
it 'returns key value' do it 'returns key value' do
expect(entry.value).to eq(image: 'ruby:2.2') expect(entry.value).to eq [:some, :array]
end end
end end
...@@ -21,17 +21,6 @@ describe Gitlab::Ci::Config::Node::HiddenJob do ...@@ -21,17 +21,6 @@ describe Gitlab::Ci::Config::Node::HiddenJob do
end end
context 'when entry value is not correct' do context 'when entry value is not correct' do
context 'incorrect config value type' do
let(:config) { ['incorrect'] }
describe '#errors' do
it 'saves errors' do
expect(entry.errors)
.to include 'hidden job config should be a hash'
end
end
end
context 'when config is empty' do context 'when config is empty' do
let(:config) { {} } let(:config) { {} }
......
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