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:
Diffstat (limited to 'spec/rubocop/cop/migration/schedule_async_spec.rb')
-rw-r--r--spec/rubocop/cop/migration/schedule_async_spec.rb32
1 files changed, 4 insertions, 28 deletions
diff --git a/spec/rubocop/cop/migration/schedule_async_spec.rb b/spec/rubocop/cop/migration/schedule_async_spec.rb
index b89acb6db41..5f848dd9b66 100644
--- a/spec/rubocop/cop/migration/schedule_async_spec.rb
+++ b/spec/rubocop/cop/migration/schedule_async_spec.rb
@@ -43,24 +43,18 @@ RSpec.describe RuboCop::Cop::Migration::ScheduleAsync do
end
context 'BackgroundMigrationWorker.perform_async' do
- it 'adds an offense when calling `BackgroundMigrationWorker.peform_async` and corrects', :aggregate_failures do
+ it 'adds an offense when calling `BackgroundMigrationWorker.peform_async`' do
expect_offense(<<~RUBY)
def up
BackgroundMigrationWorker.perform_async(ClazzName, "Bar", "Baz")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Don't call [...]
end
RUBY
-
- expect_correction(<<~RUBY)
- def up
- migrate_async(ClazzName, "Bar", "Baz")
- end
- RUBY
end
end
context 'BackgroundMigrationWorker.perform_in' do
- it 'adds an offense and corrects', :aggregate_failures do
+ it 'adds an offense' do
expect_offense(<<~RUBY)
def up
BackgroundMigrationWorker
@@ -68,17 +62,11 @@ RSpec.describe RuboCop::Cop::Migration::ScheduleAsync do
.perform_in(delay, ClazzName, "Bar", "Baz")
end
RUBY
-
- expect_correction(<<~RUBY)
- def up
- migrate_in(delay, ClazzName, "Bar", "Baz")
- end
- RUBY
end
end
context 'BackgroundMigrationWorker.bulk_perform_async' do
- it 'adds an offense and corrects', :aggregate_failures do
+ it 'adds an offense' do
expect_offense(<<~RUBY)
def up
BackgroundMigrationWorker
@@ -86,17 +74,11 @@ RSpec.describe RuboCop::Cop::Migration::ScheduleAsync do
.bulk_perform_async(jobs)
end
RUBY
-
- expect_correction(<<~RUBY)
- def up
- bulk_migrate_async(jobs)
- end
- RUBY
end
end
context 'BackgroundMigrationWorker.bulk_perform_in' do
- it 'adds an offense and corrects', :aggregate_failures do
+ it 'adds an offense' do
expect_offense(<<~RUBY)
def up
BackgroundMigrationWorker
@@ -104,12 +86,6 @@ RSpec.describe RuboCop::Cop::Migration::ScheduleAsync do
.bulk_perform_in(5.minutes, jobs)
end
RUBY
-
- expect_correction(<<~RUBY)
- def up
- bulk_migrate_in(5.minutes, jobs)
- end
- RUBY
end
end
end