Commit fd7d4c02 authored by Lin Jen-Shin's avatar Lin Jen-Shin
parent beba8485
......@@ -15,12 +15,12 @@ describe Ci::Variable, models: true do
it { is_expected.to allow_value('review/*').for(:scope) }
it { is_expected.not_to allow_value('').for(:scope) }
if defined?(EE::Ci::Variable)
it { is_expected.to validate_uniqueness_of(:key).scoped_to(:project_id, :scope) }
else
it { is_expected.to validate_uniqueness_of(:key).scoped_to(:project_id) }
let(:key_scope) do
[:project_id, :scope] # EE
end
it { is_expected.to validate_uniqueness_of(:key).scoped_to(key_scope) }
describe '.unprotected' do
subject { described_class.unprotected }
......
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