diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-09-14 22:12:31 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-10-17 07:25:20 +0000 |
commit | aafd42c49d516d301d72a4f43d7e56d7bf168d80 (patch) | |
tree | bb8e0161d2149d324faeee577542abd402c5954c /spec/models/ci | |
parent | 811de6ac73ea68ae3361ec49d2094d4f2006f493 (diff) | |
download | gitlab-ce-aafd42c49d516d301d72a4f43d7e56d7bf168d80.tar.gz |
How could I forget this?
Diffstat (limited to 'spec/models/ci')
-rw-r--r-- | spec/models/ci/pipeline_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/models/ci/pipeline_spec.rb b/spec/models/ci/pipeline_spec.rb index f564a2d4fdd..dc1d1de12a1 100644 --- a/spec/models/ci/pipeline_spec.rb +++ b/spec/models/ci/pipeline_spec.rb @@ -528,6 +528,7 @@ describe Ci::Pipeline, models: true do before do ActionMailer::Base.deliveries.clear + pipeline.update(user: create(:user)) pipeline.enqueue pipeline.run end @@ -548,9 +549,11 @@ describe Ci::Pipeline, models: true do context 'with success pipeline' do before do perform_enqueued_jobs do - pipeline.success + pipeline.succeed end end + + it_behaves_like 'sending a notification' end context 'with failed pipeline' do @@ -559,6 +562,8 @@ describe Ci::Pipeline, models: true do pipeline.drop end end + + it_behaves_like 'sending a notification' end context 'with skipped pipeline' do @@ -567,6 +572,8 @@ describe Ci::Pipeline, models: true do pipeline.skip end end + + it_behaves_like 'not sending any notification' end context 'with cancelled pipeline' do @@ -575,6 +582,8 @@ describe Ci::Pipeline, models: true do pipeline.cancel end end + + it_behaves_like 'not sending any notification' end end end |