diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/lib/gitlab/ci/config/entry | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/lib/gitlab/ci/config/entry')
-rw-r--r-- | spec/lib/gitlab/ci/config/entry/artifacts_spec.rb | 17 | ||||
-rw-r--r-- | spec/lib/gitlab/ci/config/entry/variables_spec.rb | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/spec/lib/gitlab/ci/config/entry/artifacts_spec.rb b/spec/lib/gitlab/ci/config/entry/artifacts_spec.rb index 028dcd3e1e6..0e6d5b6c311 100644 --- a/spec/lib/gitlab/ci/config/entry/artifacts_spec.rb +++ b/spec/lib/gitlab/ci/config/entry/artifacts_spec.rb @@ -36,6 +36,14 @@ RSpec.describe Gitlab::Ci::Config::Entry::Artifacts do expect(entry.value).to eq config end end + + context "when value includes 'public' keyword" do + let(:config) { { paths: %w[results.txt], public: false } } + + it 'returns general artifact and report-type artifacts configuration' do + expect(entry.value).to eq config + end + end end context 'when entry value is not correct' do @@ -67,6 +75,15 @@ RSpec.describe Gitlab::Ci::Config::Entry::Artifacts do end end + context "when 'public' is not a boolean" do + let(:config) { { paths: %w[results.txt], public: 'false' } } + + it 'reports error' do + expect(entry.errors) + .to include 'artifacts public should be a boolean value' + end + end + context "when 'expose_as' is not a string" do let(:config) { { paths: %w[results.txt], expose_as: 1 } } diff --git a/spec/lib/gitlab/ci/config/entry/variables_spec.rb b/spec/lib/gitlab/ci/config/entry/variables_spec.rb index 426a38e2ef7..78d37e228df 100644 --- a/spec/lib/gitlab/ci/config/entry/variables_spec.rb +++ b/spec/lib/gitlab/ci/config/entry/variables_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe Gitlab::Ci::Config::Entry::Variables do let(:metadata) { {} } - subject { described_class.new(config, metadata) } + subject { described_class.new(config, **metadata) } shared_examples 'valid config' do describe '#value' do |