diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-09-18 22:20:43 +0300 |
---|---|---|
committer | Kamil TrzciĆski <ayufan@ayufan.eu> | 2018-09-18 22:20:43 +0300 |
commit | d236a6c2b2e22199367c6e17c470523b587374ab (patch) | |
tree | 30c38895821994be8a24f0edbc0d555a8519b5d1 /spec/requests/api/pipelines_spec.rb | |
parent | 354f0bccbf8d530fbb5a1eb2b3cea931c644cc59 (diff) |
Resolve "Enable Auto DevOps by default for self managed instances of GitLab"
Diffstat (limited to 'spec/requests/api/pipelines_spec.rb')
-rw-r--r-- | spec/requests/api/pipelines_spec.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/spec/requests/api/pipelines_spec.rb b/spec/requests/api/pipelines_spec.rb index 342a97b6a69..f0e1992bccd 100644 --- a/spec/requests/api/pipelines_spec.rb +++ b/spec/requests/api/pipelines_spec.rb @@ -370,12 +370,18 @@ describe API::Pipelines do end context 'without gitlab-ci.yml' do - it 'fails to create pipeline' do - post api("/projects/#{project.id}/pipeline", user), ref: project.default_branch + context 'without auto devops enabled' do + before do + project.update!(auto_devops_attributes: { enabled: false }) + end - expect(response).to have_gitlab_http_status(400) - expect(json_response['message']['base'].first).to eq 'Missing .gitlab-ci.yml file' - expect(json_response).not_to be_an Array + it 'fails to create pipeline' do + post api("/projects/#{project.id}/pipeline", user), ref: project.default_branch + + expect(response).to have_gitlab_http_status(400) + expect(json_response['message']['base'].first).to eq 'Missing .gitlab-ci.yml file' + expect(json_response).not_to be_an Array + end end end end |