diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-03 18:08:16 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-03 18:08:16 +0000 |
commit | e9c2bf267862e22c0770cc7b3a1ed97a8b87a7fd (patch) | |
tree | 7b778e44f210132af1233ceb8801b388ac3519f5 /spec/services/git | |
parent | 946771d0b016ae92b15a60bc3290a33b94191ffe (diff) | |
download | gitlab-ce-e9c2bf267862e22c0770cc7b3a1ed97a8b87a7fd.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/git')
-rw-r--r-- | spec/services/git/branch_push_service_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/services/git/branch_push_service_spec.rb b/spec/services/git/branch_push_service_spec.rb index d7357cf4d0b..acd14005c69 100644 --- a/spec/services/git/branch_push_service_spec.rb +++ b/spec/services/git/branch_push_service_spec.rb @@ -129,6 +129,21 @@ describe Git::BranchPushService, services: true do end end end + + context 'when .gitlab-ci.yml file is invalid' do + before do + stub_ci_pipeline_yaml_file('invalid yaml file') + end + + it 'persists an error pipeline' do + expect { subject }.to change { Ci::Pipeline.count } + + pipeline = Ci::Pipeline.last + expect(pipeline).to be_push + expect(pipeline).to be_failed + expect(pipeline).to be_config_error + end + end end describe "Updates merge requests" do |