Commit e7c44f25 authored by Abdul Wadood's avatar Abdul Wadood Committed by Kerri Miller

Fix RSpec/EmptyLineAfterFinalLetItBe for ee/spec/services/analytics

Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/325836
parent 80b6ba1b
......@@ -620,15 +620,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- ee/spec/serializers/vulnerabilities/feedback_entity_spec.rb
- ee/spec/services/alert_management/extract_alert_payload_fields_service_spec.rb
- ee/spec/services/alert_management/process_prometheus_alert_service_spec.rb
- ee/spec/services/analytics/cycle_analytics/stages/delete_service_spec.rb
- ee/spec/services/analytics/cycle_analytics/stages/list_service_spec.rb
- ee/spec/services/analytics/cycle_analytics/stages/update_service_spec.rb
- ee/spec/services/analytics/cycle_analytics/value_streams/create_service_spec.rb
- ee/spec/services/analytics/deployments/frequency/aggregate_service_spec.rb
- ee/spec/services/analytics/devops_adoption/segments/bulk_delete_service_spec.rb
- ee/spec/services/analytics/devops_adoption/segments/create_service_spec.rb
- ee/spec/services/analytics/devops_adoption/segments/delete_service_spec.rb
- ee/spec/services/analytics/devops_adoption/segments/find_or_create_service_spec.rb
- ee/spec/services/approval_rules/create_service_spec.rb
- ee/spec/services/audit_event_service_spec.rb
- ee/spec/services/auto_merge/add_to_merge_train_when_pipeline_succeeds_service_spec.rb
......
......@@ -7,6 +7,7 @@ RSpec.describe Analytics::CycleAnalytics::Stages::DeleteService do
let_it_be(:value_stream, refind: true) { create(:cycle_analytics_group_value_stream, group: group) }
let_it_be(:user, refind: true) { create(:user) }
let_it_be(:stage, refind: true) { create(:cycle_analytics_group_stage, group: group, value_stream: value_stream) }
let(:params) { { id: stage.id } }
subject { described_class.new(parent: group, params: params, current_user: user).execute }
......
......@@ -6,6 +6,7 @@ RSpec.describe Analytics::CycleAnalytics::Stages::ListService do
let_it_be(:group, refind: true) { create(:group) }
let_it_be(:value_stream, refind: true) { create(:cycle_analytics_group_value_stream, group: group) }
let_it_be(:user) { create(:user) }
let(:stages) { subject.payload[:stages] }
subject { described_class.new(parent: group, current_user: user).execute }
......
......@@ -6,6 +6,7 @@ RSpec.describe Analytics::CycleAnalytics::Stages::UpdateService do
let_it_be(:group, refind: true) { create(:group) }
let_it_be(:value_stream, refind: true) { create(:cycle_analytics_group_value_stream, group: group) }
let_it_be(:user, refind: true) { create(:user) }
let(:default_stages) { Gitlab::Analytics::CycleAnalytics::DefaultStages.all }
let(:params) { { value_stream: value_stream } }
let(:persisted_stages) { group.reload.cycle_analytics_stages.ordered }
......@@ -98,6 +99,7 @@ RSpec.describe Analytics::CycleAnalytics::Stages::UpdateService do
context 'when updating a custom stage' do
let_it_be(:stage) { create(:cycle_analytics_group_stage, group: group, value_stream: value_stream) }
let(:params) { { id: stage.id, name: 'my new stage name', value_stream: value_stream } }
it { expect(subject).to be_success }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Analytics::CycleAnalytics::ValueStreams::CreateService do
let_it_be(:user) { create(:user) }
let_it_be(:group, refind: true) { create(:group) }
let(:params) { {} }
subject { described_class.new(group: group, params: params, current_user: user).execute }
......
......@@ -9,6 +9,7 @@ RSpec.describe Analytics::Deployments::Frequency::AggregateService do
let_it_be(:subgroup_project, refind: true) { create(:project, :repository, group: subgroup) }
let_it_be(:developer) { create(:user) }
let_it_be(:guest) { create(:user) }
let(:container) { group_project }
let(:actor) { developer }
let(:service) { described_class.new(container: container, current_user: actor, params: params) }
......
......@@ -7,6 +7,7 @@ RSpec.describe Analytics::DevopsAdoption::Segments::BulkDeleteService do
let_it_be(:group) { create(:group) }
let_it_be(:admin) { create(:user, :admin) }
let(:segment) { create(:devops_adoption_segment, namespace: group) }
let(:segment2) { create(:devops_adoption_segment) }
let(:current_user) { admin }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Analytics::DevopsAdoption::Segments::CreateService do
let_it_be(:group) { create(:group) }
let_it_be(:reporter) { create(:user).tap { |u| group.add_reporter(u) } }
let(:current_user) { reporter }
let(:params) { { namespace: group } }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Analytics::DevopsAdoption::Segments::DeleteService do
let_it_be(:group) { create(:group) }
let_it_be(:reporter) { create(:user).tap { |u| group.add_reporter(u) } }
let(:segment) { create(:devops_adoption_segment, namespace: group) }
let(:current_user) { reporter }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Analytics::DevopsAdoption::Segments::FindOrCreateService do
let_it_be(:group) { create(:group) }
let_it_be(:reporter) { create(:user).tap { |u| group.add_reporter(u) } }
let(:current_user) { reporter }
let(:params) { { namespace: group } }
......
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