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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-11-29 18:30:17 +0300
committerDouwe Maan <douwe@selenight.nl>2017-12-05 13:59:39 +0300
commit1e6ca3c41ead23c5e433460c8c807ea73d9ec0ef (patch)
treeed6a5da0def848adc1a15f80e69d9c55651895a4 /spec/workers/background_migration_worker_spec.rb
parenta5c3f1c8ff7da20183b172b2b0693a6010c9e86d (diff)
Consistently schedule Sidekiq jobs
Diffstat (limited to 'spec/workers/background_migration_worker_spec.rb')
-rw-r--r--spec/workers/background_migration_worker_spec.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/spec/workers/background_migration_worker_spec.rb b/spec/workers/background_migration_worker_spec.rb
index 4f6e3474634..1c54cf55fa0 100644
--- a/spec/workers/background_migration_worker_spec.rb
+++ b/spec/workers/background_migration_worker_spec.rb
@@ -10,35 +10,4 @@ describe BackgroundMigrationWorker, :sidekiq do
described_class.new.perform('Foo', [10, 20])
end
end
-
- describe '.perform_bulk' do
- it 'enqueues background migrations in bulk' do
- Sidekiq::Testing.fake! do
- described_class.perform_bulk([['Foo', [1]], ['Foo', [2]]])
-
- expect(described_class.jobs.count).to eq 2
- expect(described_class.jobs).to all(include('enqueued_at'))
- end
- end
- end
-
- describe '.perform_bulk_in' do
- context 'when delay is valid' do
- it 'correctly schedules background migrations' do
- Sidekiq::Testing.fake! do
- described_class.perform_bulk_in(1.minute, [['Foo', [1]], ['Foo', [2]]])
-
- expect(described_class.jobs.count).to eq 2
- expect(described_class.jobs).to all(include('at'))
- end
- end
- end
-
- context 'when delay is invalid' do
- it 'raises an ArgumentError exception' do
- expect { described_class.perform_bulk_in(-60, [['Foo']]) }
- .to raise_error(ArgumentError)
- end
- end
- end
end