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

20230224085743_update_issues_internal_id_scope_spec.rb « migrations « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7c7b58c7f0e09eafc98aac7e55263c2c69dc60c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

require 'spec_helper'
require_migration!

RSpec.describe UpdateIssuesInternalIdScope, feature_category: :team_planning do
  describe '#up' do
    it 'schedules background migration' do
      migrate!

      expect(described_class::MIGRATION).to have_scheduled_batched_migration(
        table_name: :internal_ids,
        column_name: :id,
        interval: described_class::INTERVAL)
    end
  end

  describe '#down' do
    it 'does not schedule background migration' do
      schema_migrate_down!

      expect(described_class::MIGRATION).not_to have_scheduled_batched_migration(
        table_name: :internal_ids,
        column_name: :id,
        interval: described_class::INTERVAL)
    end
  end
end