Commit b4814369 authored by Abdul Wadood's avatar Abdul Wadood Committed by David O'Regan

Fix RSpec/EmptyLineAfterFinalLetItBe for ee/spec/controllers/projects

parent 93f3c7e9
......@@ -419,13 +419,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- ee/spec/controllers/groups/autocomplete_sources_controller_spec.rb
- ee/spec/controllers/groups/insights_controller_spec.rb
- ee/spec/controllers/groups/todos_controller_spec.rb
- ee/spec/controllers/projects/branches_controller_spec.rb
- ee/spec/controllers/projects/incident_management/oncall_schedules_controller_spec.rb
- ee/spec/controllers/projects/insights_controller_spec.rb
- ee/spec/controllers/projects/licenses_controller_spec.rb
- ee/spec/controllers/projects/merge_requests_controller_spec.rb
- ee/spec/controllers/projects/mirrors_controller_spec.rb
- ee/spec/controllers/projects/threat_monitoring_controller_spec.rb
- ee/spec/controllers/subscriptions_controller_spec.rb
- ee/spec/features/boards/group_boards/multiple_boards_spec.rb
- ee/spec/features/ci_shared_runner_warnings_spec.rb
......
---
title: Fix RSpec/EmptyLineAfterFinalLetItBe rubocop offenses in ee/spec/controllers/projects
merge_request: 58410
author: Abdul Wadood @abdulwd
type: fixed
......@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Projects::BranchesController do
let_it_be(:project) { create(:project, :repository) }
let(:user) { project.owner }
before do
......
......@@ -7,6 +7,7 @@ RSpec.describe Projects::IncidentManagement::OncallSchedulesController do
let_it_be(:user_with_read_permissions) { create(:user) }
let_it_be(:user_with_admin_permissions) { create(:user) }
let_it_be(:project) { create(:project) }
let(:current_user) { user_with_admin_permissions }
describe 'GET #index' do
......
......@@ -7,6 +7,7 @@ RSpec.describe Projects::InsightsController do
let_it_be(:project) { create(:project, :private, namespace: group) }
let_it_be(:insight) { create(:insight, group: group, project: project) }
let_it_be(:user) { create(:user) }
let(:query_params) { { type: 'bar', query: { issuable_type: 'issue', collection_labels: ['bug'] }, projects: projects_params } }
let(:projects_params) { { only: [project.id, project.full_path] } }
let(:params) { { trailing_slash: true, project_id: project, namespace_id: group } }
......
......@@ -6,6 +6,7 @@ RSpec.describe Projects::LicensesController do
describe "GET #index" do
let_it_be(:project) { create(:project, :repository, :private) }
let_it_be(:user) { create(:user) }
let(:params) { { namespace_id: project.namespace, project_id: project } }
let(:get_licenses) { get :index, params: params, format: :json }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.shared_examples 'authorize read pipeline' do
context 'public project with private builds' do
let_it_be(:project) { create(:project, :public, :builds_private) }
let(:comparison_status) { {} }
it 'restricts access to signed out users' do
......@@ -52,6 +53,7 @@ RSpec.describe Projects::MergeRequestsController do
let_it_be_with_refind(:project) { create(:project, :repository) }
let_it_be(:author) { create(:user) }
let(:merge_request) { create(:merge_request_with_diffs, source_project: project, author: author) }
let(:user) { project.creator }
let(:viewer) { user }
......@@ -344,6 +346,7 @@ RSpec.describe Projects::MergeRequestsController do
describe 'GET #dependency_scanning_reports' do
let_it_be_with_reload(:merge_request) { create(:ee_merge_request, :with_dependency_scanning_reports, source_project: project, author: author) }
let(:params) do
{
namespace_id: project.namespace.to_param,
......@@ -416,6 +419,7 @@ RSpec.describe Projects::MergeRequestsController do
describe 'GET #container_scanning_reports' do
let_it_be_with_reload(:merge_request) { create(:ee_merge_request, :with_container_scanning_reports, source_project: project, author: author) }
let(:params) do
{
namespace_id: project.namespace.to_param,
......@@ -488,6 +492,7 @@ RSpec.describe Projects::MergeRequestsController do
describe 'GET #sast_reports' do
let_it_be_with_reload(:merge_request) { create(:ee_merge_request, :with_sast_reports, source_project: project, author: author) }
let(:params) do
{
namespace_id: project.namespace.to_param,
......@@ -706,6 +711,7 @@ RSpec.describe Projects::MergeRequestsController do
describe 'GET #secret_detection_reports' do
let_it_be_with_reload(:merge_request) { create(:ee_merge_request, :with_secret_detection_reports, source_project: project, author: author) }
let(:params) do
{
namespace_id: project.namespace.to_param,
......@@ -779,6 +785,7 @@ RSpec.describe Projects::MergeRequestsController do
describe 'GET #dast_reports' do
let_it_be_with_reload(:merge_request) { create(:ee_merge_request, :with_dast_reports, source_project: project) }
let(:params) do
{
namespace_id: project.namespace.to_param,
......@@ -851,6 +858,7 @@ RSpec.describe Projects::MergeRequestsController do
describe 'GET #license_scanning_reports' do
let_it_be_with_reload(:merge_request) { create(:ee_merge_request, :with_license_scanning_reports, source_project: project, author: author) }
let(:comparison_status) { { status: :parsed, data: { new_licenses: [], existing_licenses: [], removed_licenses: [] } } }
let(:params) do
......@@ -946,6 +954,7 @@ RSpec.describe Projects::MergeRequestsController do
context "when a user is NOT authorized to read licenses on a project" do
let_it_be(:project) { create(:project, :repository, :private) }
let_it_be(:merge_request) { create(:ee_merge_request, :with_license_scanning_reports, source_project: project, author: author) }
let(:viewer) { create(:user) }
it 'returns a report' do
......@@ -958,6 +967,7 @@ RSpec.describe Projects::MergeRequestsController do
context "when a user is authorized to read the licenses" do
let_it_be(:project) { create(:project, :repository, :private) }
let_it_be(:merge_request) { create(:ee_merge_request, :with_license_scanning_reports, source_project: project, author: author) }
let(:viewer) { create(:user) }
before do
......
......@@ -7,6 +7,7 @@ RSpec.describe Projects::MirrorsController do
describe 'setting up a remote mirror' do
let_it_be(:project) { create(:project, :repository) }
let(:url) { 'http://foo.com' }
context 'when the current project is a mirror' do
......
......@@ -138,6 +138,7 @@ RSpec.describe Projects::ThreatMonitoringController do
end
let_it_be(:environment) { create(:environment, :with_review_app, project: project) }
let(:environment_id) { environment.id }
context 'with authorized user' 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