summaryrefslogtreecommitdiff
path: root/spec/migrations/20211214012507_backfill_incident_issue_escalation_statuses_spec.rb
blob: 791c0595f0e1e7d39490aa5035a68cae8425fb9e (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'
require_migration!

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

  # Backfill removed - see db/migrate/20220321234317_remove_all_issuable_escalation_statuses.rb.
  it 'does nothing' do
    issues.create!(project_id: project.id, issue_type: 1)

    expect { migrate! }.not_to change { BackgroundMigrationWorker.jobs.size }
  end
end