summaryrefslogtreecommitdiff
path: root/spec/rubocop/cop/worker_data_consistency_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubocop/cop/worker_data_consistency_spec.rb')
-rw-r--r--spec/rubocop/cop/worker_data_consistency_spec.rb50
1 files changed, 0 insertions, 50 deletions
diff --git a/spec/rubocop/cop/worker_data_consistency_spec.rb b/spec/rubocop/cop/worker_data_consistency_spec.rb
deleted file mode 100644
index 5fa42bf2b87..00000000000
--- a/spec/rubocop/cop/worker_data_consistency_spec.rb
+++ /dev/null
@@ -1,50 +0,0 @@
-# frozen_string_literal: true
-
-require 'fast_spec_helper'
-require_relative '../../../rubocop/cop/worker_data_consistency'
-
-RSpec.describe RuboCop::Cop::WorkerDataConsistency do
- subject(:cop) { described_class.new }
-
- before do
- allow(cop)
- .to receive(:in_worker?)
- .and_return(true)
- end
-
- it 'adds an offense when not defining data_consistency' do
- expect_offense(<<~CODE)
- class SomeWorker
- ^^^^^^^^^^^^^^^^ Should define data_consistency expectation.[...]
- include ApplicationWorker
-
- queue_namespace :pipeline_hooks
- feature_category :continuous_integration
- urgency :high
- end
- CODE
- end
-
- it 'adds no offense when defining data_consistency' do
- expect_no_offenses(<<~CODE)
- class SomeWorker
- include ApplicationWorker
-
- queue_namespace :pipeline_hooks
- feature_category :continuous_integration
- data_consistency :delayed
- urgency :high
- end
- CODE
- end
-
- it 'adds no offense when worker is not an ApplicationWorker' do
- expect_no_offenses(<<~CODE)
- class SomeWorker
- queue_namespace :pipeline_hooks
- feature_category :continuous_integration
- urgency :high
- end
- CODE
- end
-end