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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 14:18:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-18 14:18:50 +0300
commit8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch)
treea77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb
parent00b35af3db1abfe813a778f643dad221aad51fca (diff)
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb')
-rw-r--r--spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb13
1 files changed, 6 insertions, 7 deletions
diff --git a/spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb b/spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb
index 8107cfa8957..61603d0100e 100644
--- a/spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb
+++ b/spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb
@@ -2,17 +2,16 @@
require 'fast_spec_helper'
require 'rubocop'
-require_relative '../../../support/helpers/expect_offense'
require_relative '../../../../rubocop/cop/scalability/bulk_perform_with_context'
-describe RuboCop::Cop::Scalability::BulkPerformWithContext do
+describe RuboCop::Cop::Scalability::BulkPerformWithContext, type: :rubocop do
include CopHelper
include ExpectOffense
subject(:cop) { described_class.new }
it "adds an offense when calling bulk_perform_async" do
- inspect_source(<<~CODE.strip_indent)
+ inspect_source(<<~CODE)
Worker.bulk_perform_async(args)
CODE
@@ -20,7 +19,7 @@ describe RuboCop::Cop::Scalability::BulkPerformWithContext do
end
it "adds an offense when calling bulk_perform_in" do
- inspect_source(<<~CODE.strip_indent)
+ inspect_source(<<~CODE)
diffs.each_batch(of: BATCH_SIZE) do |relation, index|
ids = relation.pluck_primary_key.map { |id| [id] }
DeleteDiffFilesWorker.bulk_perform_in(index * 5.minutes, ids)
@@ -33,7 +32,7 @@ describe RuboCop::Cop::Scalability::BulkPerformWithContext do
it "does not add an offense for migrations" do
allow(cop).to receive(:in_migration?).and_return(true)
- inspect_source(<<~CODE.strip_indent)
+ inspect_source(<<~CODE)
Worker.bulk_perform_in(args)
CODE
@@ -43,7 +42,7 @@ describe RuboCop::Cop::Scalability::BulkPerformWithContext do
it "does not add an offence for specs" do
allow(cop).to receive(:in_spec?).and_return(true)
- inspect_source(<<~CODE.strip_indent)
+ inspect_source(<<~CODE)
Worker.bulk_perform_in(args)
CODE
@@ -51,7 +50,7 @@ describe RuboCop::Cop::Scalability::BulkPerformWithContext do
end
it "does not add an offense for scheduling BackgroundMigrations" do
- inspect_source(<<~CODE.strip_indent)
+ inspect_source(<<~CODE)
BackgroundMigrationWorker.bulk_perform_in(args)
CODE