Commit 2d77d7e0 authored by Arturo Herrero's avatar Arturo Herrero

Merge branch 'issue#325836-fix-empty-line-after-let-it-be-services-merge-request' into 'master'

Fix EmptyLineAfterFinalLetItBe offenses in spec/services/merge_requests

See merge request gitlab-org/gitlab!58429
parents 00e81a1f 0392d1a8
...@@ -1035,12 +1035,6 @@ RSpec/EmptyLineAfterFinalLetItBe: ...@@ -1035,12 +1035,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- spec/services/markdown_content_rewriter_service_spec.rb - spec/services/markdown_content_rewriter_service_spec.rb
- spec/services/members/create_service_spec.rb - spec/services/members/create_service_spec.rb
- spec/services/members/invite_service_spec.rb - spec/services/members/invite_service_spec.rb
- spec/services/merge_requests/base_service_spec.rb
- spec/services/merge_requests/create_pipeline_service_spec.rb
- spec/services/merge_requests/export_csv_service_spec.rb
- spec/services/merge_requests/merge_orchestration_service_spec.rb
- spec/services/merge_requests/merge_service_spec.rb
- spec/services/merge_requests/merge_to_ref_service_spec.rb
- spec/services/metrics/dashboard/annotations/create_service_spec.rb - spec/services/metrics/dashboard/annotations/create_service_spec.rb
- spec/services/metrics/dashboard/gitlab_alert_embed_service_spec.rb - spec/services/metrics/dashboard/gitlab_alert_embed_service_spec.rb
- spec/services/metrics/users_starred_dashboards/create_service_spec.rb - spec/services/metrics/users_starred_dashboards/create_service_spec.rb
......
---
title: Fix EmptyLineAfterFinalLetItBe offenses in spec/services/merge_requests
merge_request: 58429
author: Huzaifa Iftikhar @huzaifaiftikhar
type: fixed
...@@ -6,6 +6,7 @@ RSpec.describe MergeRequests::BaseService do ...@@ -6,6 +6,7 @@ RSpec.describe MergeRequests::BaseService do
include ProjectForksHelper include ProjectForksHelper
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let(:title) { 'Awesome merge_request' } let(:title) { 'Awesome merge_request' }
let(:params) do let(:params) do
{ {
......
...@@ -7,6 +7,7 @@ RSpec.describe MergeRequests::CreatePipelineService do ...@@ -7,6 +7,7 @@ RSpec.describe MergeRequests::CreatePipelineService do
let_it_be(:project, reload: true) { create(:project, :repository) } let_it_be(:project, reload: true) { create(:project, :repository) }
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:service) { described_class.new(project, actor, params) } let(:service) { described_class.new(project, actor, params) }
let(:actor) { user } let(:actor) { user }
let(:params) { {} } let(:params) { {} }
...@@ -50,6 +51,7 @@ RSpec.describe MergeRequests::CreatePipelineService do ...@@ -50,6 +51,7 @@ RSpec.describe MergeRequests::CreatePipelineService do
context 'with fork merge request' do context 'with fork merge request' do
let_it_be(:forked_project) { fork_project(project, nil, repository: true, target_project: create(:project, :private, :repository)) } let_it_be(:forked_project) { fork_project(project, nil, repository: true, target_project: create(:project, :private, :repository)) }
let(:source_project) { forked_project } let(:source_project) { forked_project }
context 'when actor has permission to create pipelines in target project' do context 'when actor has permission to create pipelines in target project' do
......
...@@ -4,6 +4,7 @@ require 'spec_helper' ...@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe MergeRequests::ExportCsvService do RSpec.describe MergeRequests::ExportCsvService do
let_it_be(:merge_request) { create(:merge_request) } let_it_be(:merge_request) { create(:merge_request) }
let(:csv) { CSV.parse(subject.csv_data, headers: true).first } let(:csv) { CSV.parse(subject.csv_data, headers: true).first }
subject { described_class.new(MergeRequest.where(id: merge_request.id), merge_request.project) } subject { described_class.new(MergeRequest.where(id: merge_request.id), merge_request.project) }
...@@ -46,6 +47,7 @@ RSpec.describe MergeRequests::ExportCsvService do ...@@ -46,6 +47,7 @@ RSpec.describe MergeRequests::ExportCsvService do
describe 'approvers' do describe 'approvers' do
context 'when approved' do context 'when approved' do
let_it_be(:merge_request) { create(:merge_request) } let_it_be(:merge_request) { create(:merge_request) }
let(:approvers) { create_list(:user, 2) } let(:approvers) { create_list(:user, 2) }
before do before do
......
...@@ -4,6 +4,7 @@ require 'spec_helper' ...@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe MergeRequests::MergeOrchestrationService do RSpec.describe MergeRequests::MergeOrchestrationService do
let_it_be(:maintainer) { create(:user) } let_it_be(:maintainer) { create(:user) }
let(:merge_params) { { sha: merge_request.diff_head_sha } } let(:merge_params) { { sha: merge_request.diff_head_sha } }
let(:user) { maintainer } let(:user) { maintainer }
let(:service) { described_class.new(project, user, merge_params) } let(:service) { described_class.new(project, user, merge_params) }
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe MergeRequests::MergeService do RSpec.describe MergeRequests::MergeService do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:user2) { create(:user) } let_it_be(:user2) { create(:user) }
let(:merge_request) { create(:merge_request, :simple, author: user2, assignees: [user2]) } let(:merge_request) { create(:merge_request, :simple, author: user2, assignees: [user2]) }
let(:project) { merge_request.project } let(:project) { merge_request.project }
......
...@@ -68,6 +68,7 @@ RSpec.describe MergeRequests::MergeToRefService do ...@@ -68,6 +68,7 @@ RSpec.describe MergeRequests::MergeToRefService do
end end
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let(:merge_request) { create(:merge_request, :simple) } let(:merge_request) { create(:merge_request, :simple) }
let(:project) { merge_request.project } let(:project) { merge_request.project }
...@@ -226,6 +227,7 @@ RSpec.describe MergeRequests::MergeToRefService do ...@@ -226,6 +227,7 @@ RSpec.describe MergeRequests::MergeToRefService do
describe 'cascading merge refs' do describe 'cascading merge refs' do
let_it_be(:project) { create(:project, :repository) } let_it_be(:project) { create(:project, :repository) }
let(:params) { { commit_message: 'Cascading merge', first_parent_ref: first_parent_ref, target_ref: target_ref, sha: merge_request.diff_head_sha } } let(:params) { { commit_message: 'Cascading merge', first_parent_ref: first_parent_ref, target_ref: target_ref, sha: merge_request.diff_head_sha } }
context 'when first merge happens' do context 'when first merge happens' do
......
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