Commit aee18763 authored by Abdul Wadood's avatar Abdul Wadood Committed by Dmytro Zaporozhets (DZ)

Fix RSpec/EmptyLineAfterFinalLetItBe for ee/spec/policies

parent 3bc07e26
...@@ -511,12 +511,6 @@ RSpec/EmptyLineAfterFinalLetItBe: ...@@ -511,12 +511,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- ee/spec/lib/gitlab/graphql/aggregations/vulnerability_statistics/lazy_aggregate_spec.rb - ee/spec/lib/gitlab/graphql/aggregations/vulnerability_statistics/lazy_aggregate_spec.rb
- ee/spec/lib/gitlab/insights/project_insights_config_spec.rb - ee/spec/lib/gitlab/insights/project_insights_config_spec.rb
- ee/spec/lib/gitlab/sitemaps/url_extractor_spec.rb - ee/spec/lib/gitlab/sitemaps/url_extractor_spec.rb
- ee/spec/policies/clusters/agent_token_policy_spec.rb
- ee/spec/policies/compliance_management/framework_policy_spec.rb
- ee/spec/policies/group_policy_spec.rb
- ee/spec/policies/merge_request_policy_spec.rb
- ee/spec/policies/project_policy_spec.rb
- ee/spec/policies/vulnerabilities/issue_link_policy_spec.rb
- ee/spec/requests/api/analytics/code_review_analytics_spec.rb - ee/spec/requests/api/analytics/code_review_analytics_spec.rb
- ee/spec/requests/api/audit_events_spec.rb - ee/spec/requests/api/audit_events_spec.rb
- ee/spec/requests/api/commits_spec.rb - ee/spec/requests/api/commits_spec.rb
......
---
title: Fix RSpec/EmptyLineAfterFinalLetItBe rubocop offenses in ee/spec/policies
merge_request: 58371
author: Abdul Wadood @abdulwd
type: fixed
...@@ -4,6 +4,7 @@ require 'spec_helper' ...@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe Clusters::AgentTokenPolicy do RSpec.describe Clusters::AgentTokenPolicy do
let_it_be(:token) { create(:cluster_agent_token) } let_it_be(:token) { create(:cluster_agent_token) }
let(:user) { create(:user) } let(:user) { create(:user) }
let(:policy) { described_class.new(user, token) } let(:policy) { described_class.new(user, token) }
let(:project) { token.agent.project } let(:project) { token.agent.project }
......
...@@ -4,6 +4,7 @@ require 'spec_helper' ...@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe ComplianceManagement::FrameworkPolicy do RSpec.describe ComplianceManagement::FrameworkPolicy do
let_it_be_with_refind(:framework) { create(:compliance_framework) } let_it_be_with_refind(:framework) { create(:compliance_framework) }
let(:user) { framework.namespace.owner } let(:user) { framework.namespace.owner }
subject { described_class.new(user, framework) } subject { described_class.new(user, framework) }
......
...@@ -423,6 +423,7 @@ RSpec.describe GroupPolicy do ...@@ -423,6 +423,7 @@ RSpec.describe GroupPolicy do
context 'when the group is a subgroup' do context 'when the group is a subgroup' do
let_it_be(:subgroup) { create(:group, :private, parent: group) } let_it_be(:subgroup) { create(:group, :private, parent: group) }
let(:current_user) { owner } let(:current_user) { owner }
subject { described_class.new(current_user, subgroup) } subject { described_class.new(current_user, subgroup) }
......
...@@ -140,6 +140,7 @@ RSpec.describe MergeRequestPolicy do ...@@ -140,6 +140,7 @@ RSpec.describe MergeRequestPolicy do
let_it_be(:user) { create :user } let_it_be(:user) { create :user }
let(:protected_branch) { create(:protected_branch, project: project, name: branch_name, code_owner_approval_required: true) } let(:protected_branch) { create(:protected_branch, project: project, name: branch_name, code_owner_approval_required: true) }
let_it_be(:approver_group) { create(:group) } let_it_be(:approver_group) { create(:group) }
let(:merge_request) { create(:merge_request, source_project: project, target_project: project, target_branch: branch_name) } let(:merge_request) { create(:merge_request, source_project: project, target_project: project, target_branch: branch_name) }
before do before do
......
...@@ -553,6 +553,7 @@ RSpec.describe ProjectPolicy do ...@@ -553,6 +553,7 @@ RSpec.describe ProjectPolicy do
describe 'permissions for security bot' do describe 'permissions for security bot' do
let_it_be(:current_user) { create(:user, :security_bot) } let_it_be(:current_user) { create(:user, :security_bot) }
let(:project) { private_project } let(:project) { private_project }
let(:permissions) do let(:permissions) do
......
...@@ -5,6 +5,7 @@ require 'spec_helper' ...@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Vulnerabilities::IssueLinkPolicy do RSpec.describe Vulnerabilities::IssueLinkPolicy do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, namespace: user.namespace) } let_it_be(:project) { create(:project, namespace: user.namespace) }
let(:vulnerability) { create(:vulnerability, project: project) } let(:vulnerability) { create(:vulnerability, project: project) }
let(:issue) { create(:issue, project: project) } let(:issue) { create(:issue, project: project) }
let(:vulnerability_issue_link) { build(:vulnerabilities_issue_link, vulnerability: vulnerability, issue: issue) } let(:vulnerability_issue_link) { build(:vulnerabilities_issue_link, vulnerability: vulnerability, issue: issue) }
......
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