Commit 0f9a7ab1 authored by Mark Chao's avatar Mark Chao

Merge branch '322386-remove-pipeline-variables-unique-validation' into 'master'

Remove pipeline variable unique validation

See merge request gitlab-org/gitlab!69595
parents 03ad509b 162c9c1b
......@@ -8,7 +8,7 @@ module Ci
alias_attribute :secret_value, :value
validates :key, uniqueness: { scope: :pipeline_id }
validates :key, presence: true
def hook_attrs
{ key: key, value: value }
......
......@@ -7,7 +7,7 @@ RSpec.describe Ci::PipelineVariable do
it_behaves_like "CI variable"
it { is_expected.to validate_uniqueness_of(:key).scoped_to(:pipeline_id) }
it { is_expected.to validate_presence_of(:key) }
describe '#hook_attrs' do
let(:variable) { create(:ci_pipeline_variable, key: 'foo', value: 'bar') }
......
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