diff options
Diffstat (limited to 'spec/migrations/20230822151454_remove_free_user_cap_email_workers_spec.rb')
-rw-r--r-- | spec/migrations/20230822151454_remove_free_user_cap_email_workers_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/migrations/20230822151454_remove_free_user_cap_email_workers_spec.rb b/spec/migrations/20230822151454_remove_free_user_cap_email_workers_spec.rb new file mode 100644 index 00000000000..fd56c9a0988 --- /dev/null +++ b/spec/migrations/20230822151454_remove_free_user_cap_email_workers_spec.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +require 'spec_helper' +require_migration! + +RSpec.describe RemoveFreeUserCapEmailWorkers, :migration, feature_category: :onboarding do + describe '#up' do + it 'calls sidekiq_remove_jobs with correct argument' do + deprecated_job_classes = %w[ + Namespaces::FreeUserCap::BackfillNotificationClearingJobsWorker + Namespaces::FreeUserCap::BackfillNotificationJobsWorker + Namespaces::FreeUserCap::NotificationClearingWorker + Namespaces::FreeUserCap::OverLimitNotificationWorker + ] + + expect_next_instance_of(described_class) do |migration| + expect(migration).to receive(:sidekiq_remove_jobs) + .with({ job_klasses: deprecated_job_classes }) + end + + migrate! + end + end +end |