summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/database/background_migration/batched_job_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/database/background_migration/batched_job_spec.rb')
-rw-r--r--spec/lib/gitlab/database/background_migration/batched_job_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/database/background_migration/batched_job_spec.rb b/spec/lib/gitlab/database/background_migration/batched_job_spec.rb
index c39f6a78e93..a7b3670da7c 100644
--- a/spec/lib/gitlab/database/background_migration/batched_job_spec.rb
+++ b/spec/lib/gitlab/database/background_migration/batched_job_spec.rb
@@ -220,6 +220,12 @@ RSpec.describe Gitlab::Database::BackgroundMigration::BatchedJob, type: :model d
expect(described_class.created_since(fixed_time)).to contain_exactly(stuck_job, failed_job, max_attempts_failed_job)
end
end
+
+ describe '.blocked_by_max_attempts' do
+ it 'returns blocked jobs' do
+ expect(described_class.blocked_by_max_attempts).to contain_exactly(max_attempts_failed_job)
+ end
+ end
end
describe 'delegated batched_migration attributes' do