diff options
Diffstat (limited to 'spec/migrations/20230208125736_schedule_migration_for_links_spec.rb')
-rw-r--r-- | spec/migrations/20230208125736_schedule_migration_for_links_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/migrations/20230208125736_schedule_migration_for_links_spec.rb b/spec/migrations/20230208125736_schedule_migration_for_links_spec.rb new file mode 100644 index 00000000000..035f13b8309 --- /dev/null +++ b/spec/migrations/20230208125736_schedule_migration_for_links_spec.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +require 'spec_helper' +require_migration! + +RSpec.describe ScheduleMigrationForLinks, :migration, feature_category: :vulnerability_management do + let(:migration) { described_class::MIGRATION } + + describe '#up' do + it 'schedules a batched background migration' do + migrate! + + expect(migration).not_to have_scheduled_batched_migration + end + end + + describe '#down' do + it 'deletes all batched migration records' do + migrate! + schema_migrate_down! + + expect(migration).not_to have_scheduled_batched_migration + end + end +end |