Fix cycle analytics specs
This commit is contained in:
parent
8e434f0006
commit
3b8cee95a7
|
@ -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!
|
||||
|
|
Loading…
Reference in New Issue