Commit 5ce5abdc authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix hipchat service specs after changes in pipeline

parent f57cfdb6
...@@ -70,9 +70,8 @@ class CommitStatus < ActiveRecord::Base ...@@ -70,9 +70,8 @@ class CommitStatus < ActiveRecord::Base
end end
after_transition do |commit_status, transition| after_transition do |commit_status, transition|
commit_status.pipeline.tap do |pipeline| commit_status.pipeline.try do |pipeline|
return if transition.loopback? return false if transition.loopback?
return unless pipeline
if commit_status.complete? if commit_status.complete?
ProcessPipelineWorker.perform_async(pipeline.id) ProcessPipelineWorker.perform_async(pipeline.id)
......
...@@ -283,7 +283,7 @@ describe HipchatService, models: true do ...@@ -283,7 +283,7 @@ describe HipchatService, models: true do
context 'build events' do context 'build events' do
let(:pipeline) { create(:ci_empty_pipeline) } let(:pipeline) { create(:ci_empty_pipeline) }
let(:build) { create(:ci_build, pipeline: pipeline) } let(:build) { create(:ci_build, pipeline: pipeline) }
let(:data) { Gitlab::DataBuilder::Build.build(build) } let(:data) { Gitlab::DataBuilder::Build.build(build.reload) }
context 'for failed' do context 'for failed' do
before { build.drop } before { build.drop }
......
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