diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/lib/gitlab/ci/config_spec.rb | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/lib/gitlab/ci/config_spec.rb')
-rw-r--r-- | spec/lib/gitlab/ci/config_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/config_spec.rb b/spec/lib/gitlab/ci/config_spec.rb index b5a0f0e3fd7..dc03d2f80fe 100644 --- a/spec/lib/gitlab/ci/config_spec.rb +++ b/spec/lib/gitlab/ci/config_spec.rb @@ -82,6 +82,30 @@ RSpec.describe Gitlab::Ci::Config do end end + describe '#included_templates' do + let(:yml) do + <<-EOS + include: + - template: Jobs/Deploy.gitlab-ci.yml + - template: Jobs/Build.gitlab-ci.yml + - remote: https://example.com/gitlab-ci.yml + EOS + end + + before do + stub_request(:get, 'https://example.com/gitlab-ci.yml').to_return(status: 200, body: <<-EOS) + test: + script: [ 'echo hello world' ] + EOS + end + + subject(:included_templates) do + config.included_templates + end + + it { is_expected.to contain_exactly('Jobs/Deploy.gitlab-ci.yml', 'Jobs/Build.gitlab-ci.yml') } + end + context 'when using extendable hash' do let(:yml) do <<-EOS |