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
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 }
......
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