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

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

require 'spec_helper'
require_migration!

RSpec.describe DeleteOrphansApprovalRules, feature_category: :source_code_management do
  describe '#up' do
    it 'schedules background migration for both levels of approval rules' do
      migrate!

      expect(described_class::MERGE_REQUEST_MIGRATION).to have_scheduled_batched_migration(
        table_name: :approval_merge_request_rules,
        column_name: :id,
        interval: described_class::INTERVAL)

      expect(described_class::PROJECT_MIGRATION).to have_scheduled_batched_migration(
        table_name: :approval_project_rules,
        column_name: :id,
        interval: described_class::INTERVAL)
    end
  end
end