summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/cycle_analytics/shared_event_spec.rb
blob: 725f9a558f5ea679b2cc71a09eb41fd77d590d66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require 'spec_helper'

shared_examples 'default query config' do
  let(:fetcher) do
    Gitlab::CycleAnalytics::MetricsFetcher.new(project: create(:empty_project),
                                               from: 1.day.ago,
                                               branch: nil,
                                               stage: stage_name)
  end

  let(:event) { described_class.new(fetcher: fetcher, options: {}, stage: stage_name) }

  it 'has the stage attribute' do
    expect(event.stage).not_to be_nil
  end

  it 'has the projection attributes' do
    expect(event.projections).not_to be_nil
  end
end