Commit b44ecedd authored by Arturo Herrero's avatar Arturo Herrero

Merge branch 'issue#325836-fix-empty-line-after-let-it-be-projects-controller' into 'master'

Fix EmptyLineAfterFinalLetItBe Rubocop offenses for projects controller

See merge request gitlab-org/gitlab!58176
parents f691ab7b fcc4f736
......@@ -804,26 +804,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- spec/controllers/dashboard/projects_controller_spec.rb
- spec/controllers/invites_controller_spec.rb
- spec/controllers/profiles/emails_controller_spec.rb
- spec/controllers/projects/alerting/notifications_controller_spec.rb
- spec/controllers/projects/design_management/designs/raw_images_controller_spec.rb
- spec/controllers/projects/design_management/designs/resized_image_controller_spec.rb
- spec/controllers/projects/environments_controller_spec.rb
- spec/controllers/projects/feature_flags_controller_spec.rb
- spec/controllers/projects/incidents_controller_spec.rb
- spec/controllers/projects/issues_controller_spec.rb
- spec/controllers/projects/jobs_controller_spec.rb
- spec/controllers/projects/merge_requests_controller_spec.rb
- spec/controllers/projects/performance_monitoring/dashboards_controller_spec.rb
- spec/controllers/projects/pipelines_controller_spec.rb
- spec/controllers/projects/pipelines_settings_controller_spec.rb
- spec/controllers/projects/raw_controller_spec.rb
- spec/controllers/projects/releases/evidences_controller_spec.rb
- spec/controllers/projects/releases_controller_spec.rb
- spec/controllers/projects/settings/ci_cd_controller_spec.rb
- spec/controllers/projects/settings/operations_controller_spec.rb
- spec/controllers/projects/static_site_editor_controller_spec.rb
- spec/controllers/projects/todos_controller_spec.rb
- spec/controllers/projects_controller_spec.rb
- spec/controllers/users/terms_controller_spec.rb
- spec/features/boards/multiple_boards_spec.rb
- spec/features/boards/sidebar_assignee_spec.rb
......
---
title: Fix EmptyLineAfterFinalLetItBe Rubocop offenses for projects controller
merge_request: 58176
author: Huzaifa Iftikhar @huzaifaiftikhar
type: other
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Projects::Alerting::NotificationsController do
let_it_be(:project) { create(:project) }
let_it_be(:environment) { create(:environment, project: project) }
let(:params) { project_params }
describe 'POST #create' do
......@@ -68,6 +69,7 @@ RSpec.describe Projects::Alerting::NotificationsController do
context 'with a corresponding integration' do
context 'with integration parameters specified' do
let_it_be_with_reload(:integration) { create(:alert_management_http_integration, project: project) }
let(:params) { project_params(endpoint_identifier: integration.endpoint_identifier, name: integration.name) }
context 'the integration is active' do
......
......@@ -8,6 +8,7 @@ RSpec.describe Projects::DesignManagement::Designs::RawImagesController do
let_it_be(:project) { create(:project, :private) }
let_it_be(:issue) { create(:issue, project: project) }
let_it_be(:viewer) { issue.author }
let(:design_id) { design.id }
let(:sha) { design.versions.first.sha }
let(:filename) { design.filename }
......
......@@ -9,6 +9,7 @@ RSpec.describe Projects::DesignManagement::Designs::ResizedImageController do
let_it_be(:issue) { create(:issue, project: project) }
let_it_be(:viewer) { issue.author }
let_it_be(:size) { :v432x230 }
let(:design) { create(:design, :with_smaller_image_versions, issue: issue, versions_count: 2) }
let(:design_id) { design.id }
let(:sha) { design.versions.first.sha }
......
......@@ -9,6 +9,7 @@ RSpec.describe Projects::EnvironmentsController do
let_it_be(:project) { create(:project) }
let_it_be(:maintainer) { create(:user, name: 'main-dos').tap { |u| project.add_maintainer(u) } }
let_it_be(:reporter) { create(:user, name: 'repo-dos').tap { |u| project.add_reporter(u) } }
let(:user) { maintainer }
let!(:environment) { create(:environment, name: 'production', project: project) }
......
......@@ -9,6 +9,7 @@ RSpec.describe Projects::FeatureFlagsController do
let_it_be(:project) { create(:project) }
let_it_be(:developer) { create(:user) }
let_it_be(:reporter) { create(:user) }
let(:user) { developer }
before_all do
......
......@@ -69,6 +69,7 @@ RSpec.describe Projects::IncidentsController do
end
let_it_be(:resource) { create(:incident, project: project) }
let(:user) { developer }
it 'renders incident page' do
......
......@@ -8,6 +8,7 @@ RSpec.describe Projects::IssuesController do
let_it_be(:project, reload: true) { create(:project) }
let_it_be(:user, reload: true) { create(:user) }
let(:issue) { create(:issue, project: project) }
let(:spam_action_response_fields) { { 'stub_spam_action_response_fields' => true } }
......@@ -369,6 +370,7 @@ RSpec.describe Projects::IssuesController do
end
let_it_be(:issue) { create(:issue, project: project) }
let(:developer) { user }
let(:params) do
{
......@@ -1185,6 +1187,7 @@ RSpec.describe Projects::IssuesController do
context 'resolving discussions in MergeRequest' do
let_it_be(:discussion) { create(:diff_note_on_merge_request).to_discussion }
let(:merge_request) { discussion.noteable }
let(:project) { merge_request.source_project }
......@@ -1648,6 +1651,7 @@ RSpec.describe Projects::IssuesController do
describe 'POST #import_csv' do
let_it_be(:project) { create(:project, :public) }
let(:file) { fixture_file_upload('spec/fixtures/csv_comma.csv') }
context 'unauthorized' do
......@@ -1847,6 +1851,7 @@ RSpec.describe Projects::IssuesController do
context 'with cross-reference system note', :request_store do
let_it_be(:new_issue) { create(:issue) }
let(:cross_reference) { "mentioned in #{new_issue.to_reference(issue.project)}" }
before do
......
......@@ -1275,6 +1275,7 @@ RSpec.describe Projects::JobsController, :clean_gitlab_redis_shared_state do
let_it_be(:reporter) { create(:user) }
let_it_be(:guest) { create(:user) }
let_it_be(:project) { create(:project, :private, :repository, namespace: owner.namespace) }
let(:user) { maintainer }
let(:pipeline) { create(:ci_pipeline, project: project, source: :webide, config_source: :webide_source, user: user) }
let(:job) { create(:ci_build, :running, :with_runner_session, pipeline: pipeline, user: user) }
......
......@@ -8,6 +8,7 @@ RSpec.describe Projects::MergeRequestsController do
let_it_be_with_refind(:project) { create(:project, :repository) }
let_it_be_with_reload(:project_public_with_private_builds) { create(:project, :repository, :public, :builds_private) }
let(:user) { project.owner }
let(:merge_request) { create(:merge_request_with_diffs, target_project: project, source_project: project) }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Projects::PerformanceMonitoring::DashboardsController do
let_it_be(:user) { create(:user) }
let_it_be(:namespace) { create(:namespace) }
let!(:project) { create(:project, :repository, name: 'dashboard-project', namespace: namespace) }
let(:repository) { project.repository }
let(:branch) { double(name: branch_name) }
......
......@@ -7,6 +7,7 @@ RSpec.describe Projects::PipelinesController do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, :public, :repository) }
let(:feature) { ProjectFeature::ENABLED }
before do
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Projects::PipelinesSettingsController do
let_it_be(:user) { create(:user) }
let_it_be(:project_auto_devops) { create(:project_auto_devops) }
let(:project) { project_auto_devops.project }
before do
......
......@@ -6,6 +6,7 @@ RSpec.describe Projects::RawController do
include RepoHelpers
let_it_be(:project) { create(:project, :public, :repository) }
let(:inline) { nil }
describe 'GET #show' do
......
......@@ -7,6 +7,7 @@ RSpec.describe Projects::Releases::EvidencesController do
let_it_be(:private_project) { create(:project, :repository, :private) }
let_it_be(:developer) { create(:user) }
let_it_be(:reporter) { create(:user) }
let(:user) { developer }
before do
......
......@@ -11,6 +11,7 @@ RSpec.describe Projects::ReleasesController do
let_it_be(:reporter) { create(:user) }
let_it_be(:guest) { create(:user) }
let_it_be(:user) { developer }
let!(:release_1) { create(:release, project: project, released_at: Time.zone.parse('2018-10-18')) }
let!(:release_2) { create(:release, project: project, released_at: Time.zone.parse('2019-10-19')) }
......
......@@ -5,6 +5,7 @@ require('spec_helper')
RSpec.describe Projects::Settings::CiCdController do
let_it_be(:user) { create(:user) }
let_it_be(:project_auto_devops) { create(:project_auto_devops) }
let(:project) { project_auto_devops.project }
before do
......
......@@ -493,6 +493,7 @@ RSpec.describe Projects::Settings::OperationsController do
describe 'PATCH #update' do
let_it_be(:external_url) { 'https://gitlab.com' }
let(:params) do
{
tracing_setting_attributes: {
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Projects::StaticSiteEditorController do
let_it_be(:project) { create(:project, :public, :repository) }
let_it_be(:user) { create(:user) }
let(:data) { { key: 'value' } }
describe 'GET index' do
......
......@@ -5,6 +5,7 @@ require('spec_helper')
RSpec.describe Projects::TodosController do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
let(:issue) { create(:issue, project: project) }
let(:merge_request) { create(:merge_request, source_project: project) }
let(:design) { create(:design, project: project, issue: issue) }
......
......@@ -10,6 +10,7 @@ RSpec.describe ProjectsController do
let_it_be(:project, reload: true) { create(:project, service_desk_enabled: false) }
let_it_be(:public_project) { create(:project, :public) }
let_it_be(:user) { create(:user) }
let(:jpg) { fixture_file_upload('spec/fixtures/rails_sample.jpg', 'image/jpg') }
let(:txt) { fixture_file_upload('spec/fixtures/doc_sample.txt', 'text/plain') }
......@@ -548,6 +549,7 @@ RSpec.describe ProjectsController do
describe '#housekeeping' do
let_it_be(:group) { create(:group) }
let_it_be(:project) { create(:project, group: group) }
let(:housekeeping) { Repositories::HousekeepingService.new(project) }
context 'when authenticated as owner' do
......@@ -1097,6 +1099,7 @@ RSpec.describe ProjectsController do
context 'state filter on references' do
let_it_be(:issue) { create(:issue, :closed, project: public_project) }
let(:merge_request) { create(:merge_request, :closed, target_project: public_project) }
it 'renders JSON body with state filter for issues' 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