Skip to content
Snippets Groups Projects
Commit 5ce5abdc authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Fix hipchat service specs after changes in pipeline

parent f57cfdb6
No related branches found
No related tags found
No related merge requests found
Loading
@@ -70,9 +70,8 @@ class CommitStatus < ActiveRecord::Base
Loading
@@ -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)
Loading
Loading
Loading
@@ -283,7 +283,7 @@ describe HipchatService, models: true do
Loading
@@ -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 }
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment