track_untracked_uploads_spec.rb 481 Bytes
Newer Older
1 2 3
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20171103140253_track_untracked_uploads')

4
describe TrackUntrackedUploads, :migration, :sidekiq do
5
  include MigrationsHelpers::TrackUntrackedUploadsHelpers
6

7 8
  it 'correctly schedules the follow-up background migration' do
    Sidekiq::Testing.fake! do
9 10 11 12 13 14 15
      migrate!

      expect(described_class::MIGRATION).to be_scheduled_migration
      expect(BackgroundMigrationWorker.jobs.size).to eq(1)
    end
  end
end