Commit 8e6d266d authored by Abdul Wadood's avatar Abdul Wadood Committed by Nick Thomas

Fix RSpec/EmptyLineAfterFinalLetItBe for ee/spec/workers

parent f33a8c0c
......@@ -876,19 +876,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- ee/spec/views/projects/pipelines/_tabs_content.html.haml_spec.rb
- ee/spec/views/shared/billings/_eoa_bronze_plan_banner.html.haml_spec.rb
- ee/spec/views/shared/billings/_trial_status.html.haml_spec.rb
- ee/spec/workers/adjourned_projects_deletion_cron_worker_spec.rb
- ee/spec/workers/deployments/auto_rollback_worker_spec.rb
- ee/spec/workers/dora/daily_metrics/refresh_worker_spec.rb
- ee/spec/workers/ee/issuable_export_csv_worker_spec.rb
- ee/spec/workers/elastic_namespace_indexer_worker_spec.rb
- ee/spec/workers/geo/batch/project_registry_scheduler_worker_spec.rb
- ee/spec/workers/geo/prune_event_log_worker_spec.rb
- ee/spec/workers/geo/repository_verification/primary/single_worker_spec.rb
- ee/spec/workers/incident_management/oncall_rotations/persist_shifts_job_spec.rb
- ee/spec/workers/post_receive_spec.rb
- ee/spec/workers/requirements_management/import_requirements_csv_worker_spec.rb
- ee/spec/workers/security/auto_fix_worker_spec.rb
- ee/spec/workers/set_user_status_based_on_user_cap_setting_worker_spec.rb
- spec/controllers/confirmations_controller_spec.rb
- spec/controllers/dashboard/projects_controller_spec.rb
- spec/controllers/groups/dependency_proxy_auth_controller_spec.rb
......
---
title: Fix RSpec/EmptyLineAfterFinalLetItBe rubocop offenses in ee/spec/workers
merge_request: 58272
author: Abdul Wadood @abdulwd
type: fixed
......@@ -8,6 +8,7 @@ RSpec.describe AdjournedProjectsDeletionCronWorker do
let_it_be(:user) { create(:user)}
let_it_be(:marked_for_deletion_at) { 14.days.ago }
let!(:project_marked_for_deletion) { create(:project, marked_for_deletion_at: marked_for_deletion_at, deleting_user: user) }
before do
......
......@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Deployments::AutoRollbackWorker do
let_it_be(:environment) { create(:environment) }
let(:worker) { described_class.new }
describe '#perform' do
......
......@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Dora::DailyMetrics::RefreshWorker do
let_it_be(:environment) { create(:environment) }
let(:worker) { described_class.new }
describe '#perform' do
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe IssuableExportCsvWorker do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, creator: user) }
let(:params) { {} }
subject { described_class.new.perform(issuable_type, user.id, project.id, params) }
......
......@@ -34,6 +34,7 @@ RSpec.describe ElasticNamespaceIndexerWorker do
describe 'indexing and deleting' do
let_it_be(:namespace) { create :namespace }
let(:projects) { create_list :project, 3, namespace: namespace }
it 'indexes all projects belonging to the namespace' do
......
......@@ -7,6 +7,7 @@ RSpec.describe Geo::Batch::ProjectRegistrySchedulerWorker do
include ::EE::GeoHelpers
let_it_be(:secondary) { create(:geo_node) }
let(:lease_key) { subject.lease_key }
let(:lease_timeout) { 2.minutes }
......
......@@ -91,6 +91,7 @@ RSpec.describe Geo::PruneEventLogWorker, :geo do
context 'multiple secondary nodes' do
let_it_be(:secondary2) { create(:geo_node) }
let!(:events) { create_list(:geo_event_log, 5, :updated_event) }
it 'aborts when there is a node without status' do
......
......@@ -7,6 +7,7 @@ RSpec.describe Geo::RepositoryVerification::Primary::SingleWorker, :clean_gitlab
include ExclusiveLeaseHelpers
let_it_be(:project) { create(:project) }
let!(:primary) { create(:geo_node, :primary) }
before do
......
......@@ -140,6 +140,7 @@ RSpec.describe IncidentManagement::OncallRotations::PersistShiftsJob do
context 'when current time is after a rotation has re-started after an edit' do
let_it_be(:new_starts_at) { rotation.starts_at + 3 * rotation.shift_cycle_duration }
let_it_be(:updated_at) { rotation.starts_at + rotation.shift_cycle_duration }
let(:current_time) { 2.minutes.after(new_starts_at) }
before do
......@@ -200,6 +201,7 @@ RSpec.describe IncidentManagement::OncallRotations::PersistShiftsJob do
context 'when rotation was previously ended but is now in progress' do
let_it_be(:updated_at) { rotation.reload.starts_at + 3 * rotation.shift_cycle_duration }
let(:current_time) { updated_at.change(hour: 8, min: 2) }
let(:expected_shift_start) { updated_at.change(hour: existing_shift.starts_at.hour) }
let(:expected_shift_end) { updated_at.change(hour: existing_shift.ends_at.hour) }
......
......@@ -129,6 +129,7 @@ RSpec.describe PostReceive do
context 'with a group wiki' do
let_it_be(:group) { create(:group) }
let(:wiki) { build(:group_wiki, group: group) }
it 'calls Git::WikiPushService#execute' do
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe RequirementsManagement::ImportRequirementsCsvWorker do
let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) }
let(:upload) { create(:upload, :with_file) }
subject { described_class.new.perform(user.id, project.id, upload.id) }
......
......@@ -7,6 +7,7 @@ RSpec.describe Security::AutoFixWorker do
subject(:perform) { described_class.new.perform(pipeline.id) }
let_it_be(:pipeline) { create(:ci_pipeline, ref: 'master') }
let(:project) { pipeline.project }
before do
......
......@@ -7,6 +7,7 @@ RSpec.describe SetUserStatusBasedOnUserCapSettingWorker, type: :worker do
describe '#perform' do
let_it_be(:user) { create(:user, :blocked_pending_approval) }
let(:new_user_signups_cap) { 10 }
subject { described_class.new.perform(user.id) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment