diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-09-12 09:21:47 +0200 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-09-13 11:36:04 +0200 |
commit | eeeea489fba033274dec2087798e2480d2139ab4 (patch) | |
tree | 94846a97367fb8c2a84b97f7c7693cf5fc3d85da /spec/helpers | |
parent | 9c9b1774cbdc2a6cdfbbf8cd33e87e62294e729a (diff) | |
download | gitlab-ce-eeeea489fba033274dec2087798e2480d2139ab4.tar.gz |
AutoDevOps banner hidden on explicit CI config
Extends the helper method to no show the banner as soon as the project
has a `.gitlab-ci.yml` file on the default branch.
Fixes gitlab-org/gitlab-ce#37652
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/auto_devops_helper_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/helpers/auto_devops_helper_spec.rb b/spec/helpers/auto_devops_helper_spec.rb index 80d58ff6bf7..881538bc1c6 100644 --- a/spec/helpers/auto_devops_helper_spec.rb +++ b/spec/helpers/auto_devops_helper_spec.rb @@ -65,5 +65,21 @@ describe AutoDevopsHelper do it { is_expected.to eq(false) } end + + context 'when master contains a .gitlab-ci.yml file' do + before do + allow(project.repository).to receive(:gitlab_ci_yml).and_return("script: [ 'test']") + end + + it { is_expected.to eq(false) } + end + + context 'when another service is enabled' do + before do + create(:service, project: project, category: :ci, active: true) + end + + it { is_expected.to eq(false) } + end end end |