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

20220321234317_remove_all_issuable_escalation_statuses_spec.rb « migrations « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c645a7689691e9267770a67a6470355406868411 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

require 'spec_helper'
require_migration!

RSpec.describe RemoveAllIssuableEscalationStatuses, feature_category: :incident_management do
  let(:namespaces)  { table(:namespaces) }
  let(:projects)    { table(:projects) }
  let(:issues)      { table(:issues) }
  let(:statuses)    { table(:incident_management_issuable_escalation_statuses) }
  let(:namespace)   { namespaces.create!(name: 'foo', path: 'foo') }
  let(:project)     { projects.create!(namespace_id: namespace.id) }

  it 'removes all escalation status records' do
    issue = issues.create!(project_id: project.id, issue_type: 1)
    statuses.create!(issue_id: issue.id)

    expect { migrate! }.to change(statuses, :count).from(1).to(0)
  end
end