BigW Consortium Gitlab

Commit aafd42c4 by Lin Jen-Shin

How could I forget this?

parent 811de6ac
...@@ -528,6 +528,7 @@ describe Ci::Pipeline, models: true do ...@@ -528,6 +528,7 @@ describe Ci::Pipeline, models: true do
before do before do
ActionMailer::Base.deliveries.clear ActionMailer::Base.deliveries.clear
pipeline.update(user: create(:user))
pipeline.enqueue pipeline.enqueue
pipeline.run pipeline.run
end end
...@@ -548,9 +549,11 @@ describe Ci::Pipeline, models: true do ...@@ -548,9 +549,11 @@ describe Ci::Pipeline, models: true do
context 'with success pipeline' do context 'with success pipeline' do
before do before do
perform_enqueued_jobs do perform_enqueued_jobs do
pipeline.success pipeline.succeed
end end
end end
it_behaves_like 'sending a notification'
end end
context 'with failed pipeline' do context 'with failed pipeline' do
...@@ -559,6 +562,8 @@ describe Ci::Pipeline, models: true do ...@@ -559,6 +562,8 @@ describe Ci::Pipeline, models: true do
pipeline.drop pipeline.drop
end end
end end
it_behaves_like 'sending a notification'
end end
context 'with skipped pipeline' do context 'with skipped pipeline' do
...@@ -567,6 +572,8 @@ describe Ci::Pipeline, models: true do ...@@ -567,6 +572,8 @@ describe Ci::Pipeline, models: true do
pipeline.skip pipeline.skip
end end
end end
it_behaves_like 'not sending any notification'
end end
context 'with cancelled pipeline' do context 'with cancelled pipeline' do
...@@ -575,6 +582,8 @@ describe Ci::Pipeline, models: true do ...@@ -575,6 +582,8 @@ describe Ci::Pipeline, models: true do
pipeline.cancel pipeline.cancel
end end
end end
it_behaves_like 'not sending any notification'
end end
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment