diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-18 18:06:53 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-18 18:06:53 +0000 |
commit | 143f196f8b3c40ceb7e9335a8dcc712b079519b9 (patch) | |
tree | 909df13e1f99b456287934741ba466b506e01129 /spec/models/ci/build_spec.rb | |
parent | 575ccb036ea14c6a899482a83bd985ffbc992077 (diff) | |
download | gitlab-ce-143f196f8b3c40ceb7e9335a8dcc712b079519b9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/ci/build_spec.rb')
-rw-r--r-- | spec/models/ci/build_spec.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 04c8fb8c5f7..24fa3b9b1ea 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -2221,7 +2221,7 @@ describe Ci::Build do { key: 'CI_PAGES_URL', value: project.pages_url, public: true, masked: false }, { key: 'CI_API_V4_URL', value: 'http://localhost/api/v4', public: true, masked: false }, { key: 'CI_PIPELINE_IID', value: pipeline.iid.to_s, public: true, masked: false }, - { key: 'CI_CONFIG_PATH', value: pipeline.ci_yaml_file_path, public: true, masked: false }, + { key: 'CI_CONFIG_PATH', value: pipeline.config_path, public: true, masked: false }, { key: 'CI_PIPELINE_SOURCE', value: pipeline.source, public: true, masked: false }, { key: 'CI_COMMIT_MESSAGE', value: pipeline.git_commit_message, public: true, masked: false }, { key: 'CI_COMMIT_TITLE', value: pipeline.git_commit_title, public: true, masked: false }, @@ -2667,11 +2667,17 @@ describe Ci::Build do it { is_expected.to include(deployment_variable) } end + context 'when project has default CI config path' do + let(:ci_config_path) { { key: 'CI_CONFIG_PATH', value: '.gitlab-ci.yml', public: true, masked: false } } + + it { is_expected.to include(ci_config_path) } + end + context 'when project has custom CI config path' do let(:ci_config_path) { { key: 'CI_CONFIG_PATH', value: 'custom', public: true, masked: false } } before do - project.update(ci_config_path: 'custom') + expect_any_instance_of(Project).to receive(:ci_config_path) { 'custom' } end it { is_expected.to include(ci_config_path) } |