diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-03-15 15:52:55 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-03-15 15:52:55 +0300 |
commit | 2a2b65c4b97a039c553d829d56a58875cde91754 (patch) | |
tree | 022455dec95c3220950d3ae2ce5a5faf530a1fd8 /spec/models/ci | |
parent | 0e1c67d15cc2042907cd7e2ed2fb40f2b476a33c (diff) | |
parent | a830c49a3fcf684f89ea5068bbca8ccc1b83fc4c (diff) |
Merge branch 'backstage/gb/refactor-ci-cd-variables-collections' into 'master'
Introduce CI/CD variables collection
Closes #33042
See merge request gitlab-org/gitlab-ce!14439
Diffstat (limited to 'spec/models/ci')
-rw-r--r-- | spec/models/ci/build_spec.rb | 8 | ||||
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 3b8cf16ee1a..01203ff44c8 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -1885,10 +1885,10 @@ describe Ci::Build do describe 'variables ordering' do context 'when variables hierarchy is stubbed' do - let(:build_pre_var) { { key: 'build', value: 'value' } } - let(:project_pre_var) { { key: 'project', value: 'value' } } - let(:pipeline_pre_var) { { key: 'pipeline', value: 'value' } } - let(:build_yaml_var) { { key: 'yaml', value: 'value' } } + let(:build_pre_var) { { key: 'build', value: 'value', public: true } } + let(:project_pre_var) { { key: 'project', value: 'value', public: true } } + let(:pipeline_pre_var) { { key: 'pipeline', value: 'value', public: true } } + let(:build_yaml_var) { { key: 'yaml', value: 'value', public: true } } before do allow(build).to receive(:predefined_variables) { [build_pre_var] } diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index 86bb2fefae1..4635f8cfe9d 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -170,10 +170,8 @@ describe Ci::Pipeline, :mailer do describe '#predefined_variables' do subject { pipeline.predefined_variables } - it { is_expected.to be_an(Array) } - it 'includes all predefined variables in a valid order' do - keys = subject.map { |variable| variable.fetch(:key) } + keys = subject.map { |variable| variable[:key] } expect(keys).to eq %w[CI_PIPELINE_ID CI_CONFIG_PATH CI_PIPELINE_SOURCE] end |