blob: bdb4d25c142ad21ccd80e46edabf7a5a87123a08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe ::Gitlab::Ci::Config::Entry::Inherit::Variables do
using RSpec::Parameterized::TableSyntax
subject { described_class.new(config) }
context 'validations' do
where(:config, :valid) do
true | true
false | true
%w[A] | true
%w[A B] | true
%i[image] | true
[true] | false
"string" | false
end
with_them do
it do
expect(subject.valid?).to eq(valid)
end
end
end
end
|