Fix rubocop offense in build stage migration classes

This commit is contained in:
Grzegorz Bizon 2018-01-06 16:07:55 +01:00
parent fefb8ef74f
commit c181683d99
2 changed files with 3 additions and 5 deletions

View File

@ -40,7 +40,7 @@ module Gitlab
# In that case we just don't migrate such stage.
#
def legacy?
@build.stage.nil?
@build.stage.nil?
end
def ensure!

View File

@ -8,6 +8,8 @@ describe ScheduleBuildStageMigration, :migration do
let(:jobs) { table(:ci_builds) }
before do
stub_const("#{described_class}::BATCH", 1)
##
# Dependencies
#
@ -24,10 +26,6 @@ describe ScheduleBuildStageMigration, :migration do
jobs.create!(id: 4109, commit_id: 1, project_id: 123, stage_id: 1)
end
before do
stub_const("#{described_class}::BATCH", 1)
end
it 'schedules delayed background migrations in batches in bulk' do
Sidekiq::Testing.fake! do
Timecop.freeze do