diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-14 23:00:15 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-19 10:07:13 +0200 |
commit | 6b979687459ad1ab5f1953bf451ee80fdb899b96 (patch) | |
tree | ff19ce3e4386a562a68cf9a9d9071ea7d02934ec /spec/lib/ci | |
parent | e1b3ab5af290f6d2eeb56c4b72e341324414a6d2 (diff) | |
download | gitlab-ce-6b979687459ad1ab5f1953bf451ee80fdb899b96.tar.gz |
Update support for dynamic environments
Diffstat (limited to 'spec/lib/ci')
-rw-r--r-- | spec/lib/ci/gitlab_ci_yaml_processor_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb index af192664b33..2ad33007b8a 100644 --- a/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb +++ b/spec/lib/ci/gitlab_ci_yaml_processor_spec.rb @@ -754,6 +754,20 @@ module Ci it 'does return production' do expect(builds.size).to eq(1) expect(builds.first[:environment]).to eq(environment) + expect(builds.first[:options]).to include(environment: { name: environment }) + end + end + + context 'when hash is specified' do + let(:environment) do + { name: 'production', + url: 'http://production.gitlab.com' } + end + + it 'does return production and URL' do + expect(builds.size).to eq(1) + expect(builds.first[:environment]).to eq(environment[:name]) + expect(builds.first[:options]).to include(environment) end end |