Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/ci/config_spec.rb')
-rw-r--r--spec/lib/gitlab/ci/config_spec.rb24
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