blob: c88e3e22f5c361085bf30816d699a10fc012c720 (
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
35
36
37
38
|
require 'spec_helper'
shared_examples 'base stage' do
let(:stage) { described_class.new(project: double, options: {}) }
before do
allow_any_instance_of(Gitlab::CycleAnalytics::MetricsFetcher).to receive(:median).and_return(1.12)
allow_any_instance_of(Gitlab::CycleAnalytics::BaseEventFetcher).to receive(:event_result).and_return({})
end
it 'has the start attributes' do
expect(stage.start_time_attrs).not_to be_nil
end
it 'has the end attributes' do
expect(stage.end_time_attrs).not_to be_nil
end
it 'has the median data value' do
expect(stage.median_data[:value]).not_to be_nil
end
it 'has the median data stage' do
expect(stage.median_data[:title]).not_to be_nil
end
it 'has the median data description' do
expect(stage.median_data[:description]).not_to be_nil
end
it 'has the title' do
expect(stage.title).to eq(stage_name.to_s.capitalize)
end
it 'has the events' do
expect(stage.events).not_to be_nil
end
end
|