Welcome to mirror list, hosted at ThFree Co, Russian Federation.

stage_entity_spec.rb « cycle_analytics « analytics « serializers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 90cc7f7827be6a317c0ac90ef61996e347f6b28c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Analytics::CycleAnalytics::StageEntity do
  let(:stage) { build(:cycle_analytics_project_stage, start_event_identifier: :merge_request_created, end_event_identifier: :merge_request_merged) }

  subject(:entity_json) { described_class.new(Analytics::CycleAnalytics::StagePresenter.new(stage)).as_json }

  it 'exposes start and end event descriptions' do
    expect(entity_json).to have_key(:start_event_html_description)
    expect(entity_json).to have_key(:end_event_html_description)
  end
end