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

enqueue_delete_diff_files_workers_spec.rb « migrations « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6bae870920c85510fa96d682a75d49f613c0ce30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20180619121030_enqueue_delete_diff_files_workers.rb')

describe EnqueueDeleteDiffFilesWorkers, :migration, :sidekiq do
  it 'correctly schedules diff files deletion schedulers' do
    Sidekiq::Testing.fake! do
      expect(BackgroundMigrationWorker)
        .to receive(:perform_async)
        .with(described_class::SCHEDULER)
        .and_call_original

      migrate!

      expect(BackgroundMigrationWorker.jobs.size).to eq(1)
    end
  end
end