Commit 3b8cee95 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Fix cycle analytics specs

parent 8e434f00
......@@ -122,17 +122,18 @@ describe 'cycle analytics events' do
let(:stage) { :test }
let(:merge_request) { MergeRequest.first }
let!(:pipeline) do
create(:ci_pipeline,
ref: merge_request.source_branch,
sha: merge_request.diff_head_sha,
project: context.project,
project: project,
head_pipeline_of: merge_request)
end
before do
create(:ci_build, pipeline: pipeline, status: :success, author: user)
create(:ci_build, pipeline: pipeline, status: :success, author: user)
create(:ci_build, :success, pipeline: pipeline, author: user)
create(:ci_build, :success, pipeline: pipeline, author: user)
pipeline.run!
pipeline.succeed!
......@@ -219,17 +220,18 @@ describe 'cycle analytics events' do
describe '#staging_events' do
let(:stage) { :staging }
let(:merge_request) { MergeRequest.first }
let!(:pipeline) do
create(:ci_pipeline,
ref: merge_request.source_branch,
sha: merge_request.diff_head_sha,
project: context.project,
project: project,
head_pipeline_of: merge_request)
end
before do
create(:ci_build, pipeline: pipeline, status: :success, author: user)
create(:ci_build, pipeline: pipeline, status: :success, author: user)
create(:ci_build, :success, pipeline: pipeline, author: user)
create(:ci_build, :success, pipeline: pipeline, author: user)
pipeline.run!
pipeline.succeed!
......
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