summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/background_migration/fix_merge_request_diff_commit_users_spec.rb
blob: 99df21562b07ec890641c08514f519e40e2232ab (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
# frozen_string_literal: true

require 'spec_helper'

# rubocop: disable RSpec/FactoriesInMigrationSpecs
RSpec.describe Gitlab::BackgroundMigration::FixMergeRequestDiffCommitUsers do
  let(:migration) { described_class.new }

  describe '#perform' do
    context 'when the project exists' do
      it 'does nothing' do
        project = create(:project)

        expect { migration.perform(project.id) }.not_to raise_error
      end
    end

    context 'when the project does not exist' do
      it 'does nothing' do
        expect { migration.perform(-1) }.not_to raise_error
      end
    end
  end
end
# rubocop: enable RSpec/FactoriesInMigrationSpecs