blob: 404e1bf7c87cdeac88f234eff6262a20d46e8d7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Ci::ProcessPipelineService do
let_it_be(:project) { create(:project) }
let(:pipeline) do
create(:ci_empty_pipeline, ref: 'master', project: project)
end
let(:pipeline_processing_events_counter) { double(increment: true) }
let(:metrics) do
double(pipeline_processing_events_counter: pipeline_processing_events_counter)
end
subject { described_class.new(pipeline) }
before do
stub_ci_pipeline_to_return_yaml_file
stub_not_protect_default_branch
allow(subject).to receive(:metrics).and_return(metrics)
end
describe 'processing events counter' do
it 'increments processing events counter' do
expect(pipeline_processing_events_counter).to receive(:increment)
subject.execute
end
end
end
|