diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-09-06 18:57:07 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-09-06 18:57:07 +0200 |
commit | 82ed2a0909823807f3ece2cb29bfc501293361a0 (patch) | |
tree | 697cee39fdf2ef7ec353d32016f96052cb6c6459 /spec | |
parent | 8189347b4986e2e44b30d04bf9e83c11e76feef8 (diff) | |
download | gitlab-ce-82ed2a0909823807f3ece2cb29bfc501293361a0.tar.gz |
Improve config source handling code
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index ff8f476d482..8b36fffd808 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -832,10 +832,10 @@ describe Ci::Pipeline, :mailer do describe '#ci_yaml_file' do let(:implied_yml) { Gitlab::Template::GitlabCiYmlTemplate.find('Auto-DevOps').content } - before { pipeline.detect_ci_yaml_file } - context 'the source is unknown' do - before { pipeline.unknown_source! } + before do + pipeline.unknown_source! + end it 'returns the configuration if found' do allow(pipeline.project.repository).to receive(:gitlab_ci_yml_for) @@ -854,7 +854,9 @@ describe Ci::Pipeline, :mailer do end context 'the source is the repository' do - before { pipeline.repository_source! } + before do + pipeline.repository_source! + end it 'returns the configuration if found' do allow(pipeline.project.repository).to receive(:gitlab_ci_yml_for) @@ -867,7 +869,9 @@ describe Ci::Pipeline, :mailer do end context 'when the source is auto_devops_source' do - before { pipeline.auto_devops_source! } + before do + pipeline.auto_devops_source! + end it 'finds the implied config' do allow_any_instance_of(ApplicationSetting) |