summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/analytics/cycle_analytics/stage_events/issue_deployed_to_production_spec.rb
blob: e807565ecb58a273e48ada23cdb1d5fb832c15de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe Gitlab::Analytics::CycleAnalytics::StageEvents::IssueDeployedToProduction do
  it_behaves_like 'value stream analytics event'

  it_behaves_like 'LEFT JOIN-able value stream analytics event' do
    let_it_be(:record_with_data) do
      mr_closing_issue = FactoryBot.create(:merge_requests_closing_issues)
      mr = mr_closing_issue.merge_request
      mr.metrics.update!(first_deployed_to_production_at: Time.current)

      mr_closing_issue.issue
    end

    let_it_be(:record_without_data) { create(:issue) }
  end
end