Fix hipchat service specs after changes in pipeline
This commit is contained in:
parent
f57cfdb6b5
commit
5ce5abdc1d
2 changed files with 3 additions and 4 deletions
|
@ -70,9 +70,8 @@ class CommitStatus < ActiveRecord::Base
|
|||
end
|
||||
|
||||
after_transition do |commit_status, transition|
|
||||
commit_status.pipeline.tap do |pipeline|
|
||||
return if transition.loopback?
|
||||
return unless pipeline
|
||||
commit_status.pipeline.try do |pipeline|
|
||||
return false if transition.loopback?
|
||||
|
||||
if commit_status.complete?
|
||||
ProcessPipelineWorker.perform_async(pipeline.id)
|
||||
|
|
|
@ -283,7 +283,7 @@ describe HipchatService, models: true do
|
|||
context 'build events' do
|
||||
let(:pipeline) { create(:ci_empty_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
|
||||
before { build.drop }
|
||||
|
|
Loading…
Reference in a new issue