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

partition_creation_worker_spec.rb « workers « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 50ed9c901c190aa7bf93757d298cf5ae80cab8d6 (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"

RSpec.describe PartitionCreationWorker do
  describe '#perform' do
    let(:creator) { double(create_partitions: nil) }

    before do
      allow(Gitlab::Database::Partitioning::PartitionCreator).to receive(:new).and_return(creator)
    end

    it 'delegates to PartitionCreator' do
      expect(creator).to receive(:create_partitions)

      described_class.new.perform
    end
  end
end