2020-07-14 20:09:23 -04:00
|
|
|
# frozen_string_literal: true
|
2021-07-13 11:08:38 -04:00
|
|
|
#
|
|
|
|
require 'spec_helper'
|
2020-07-14 20:09:23 -04:00
|
|
|
|
|
|
|
RSpec.describe PartitionCreationWorker do
|
2021-07-13 11:08:38 -04:00
|
|
|
subject { described_class.new.perform }
|
2020-07-14 20:09:23 -04:00
|
|
|
|
2021-07-13 11:08:38 -04:00
|
|
|
let(:management_worker) { double }
|
2020-07-14 20:09:23 -04:00
|
|
|
|
2021-07-13 11:08:38 -04:00
|
|
|
describe '#perform' do
|
|
|
|
it 'forwards to the Database::PartitionManagementWorker' do
|
|
|
|
expect(Database::PartitionManagementWorker).to receive(:new).and_return(management_worker)
|
|
|
|
expect(management_worker).to receive(:perform)
|
2020-09-02 08:10:35 -04:00
|
|
|
|
|
|
|
subject
|
2020-07-14 20:09:23 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|