2017-11-06 16:44:30 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
require Rails.root.join('db', 'post_migrate', '20171103140253_track_untracked_uploads')
|
|
|
|
|
2017-11-15 08:19:07 -05:00
|
|
|
describe TrackUntrackedUploads, :migration, :sidekiq do
|
2018-02-20 15:00:00 -05:00
|
|
|
include MigrationsHelpers::TrackUntrackedUploadsHelpers
|
2017-11-08 18:05:08 -05:00
|
|
|
|
2017-11-15 08:19:07 -05:00
|
|
|
it 'correctly schedules the follow-up background migration' do
|
|
|
|
Sidekiq::Testing.fake! do
|
2017-11-06 16:44:30 -05:00
|
|
|
migrate!
|
|
|
|
|
|
|
|
expect(described_class::MIGRATION).to be_scheduled_migration
|
|
|
|
expect(BackgroundMigrationWorker.jobs.size).to eq(1)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|