Commit d05c4f0d authored by Dmytro Zaporozhets (DZ)'s avatar Dmytro Zaporozhets (DZ)

Merge branch 'rspec-empty-line-after-letitbe-ee-spec-policies' into 'master'

Fix RSpec/EmptyLineAfterFinalLetItBe for ee/spec/policies

See merge request gitlab-org/gitlab!58371
parents 34ce74e3 aee18763
......@@ -509,12 +509,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- 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/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/audit_events_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'
RSpec.describe Clusters::AgentTokenPolicy do
let_it_be(:token) { create(:cluster_agent_token) }
let(:user) { create(:user) }
let(:policy) { described_class.new(user, token) }
let(:project) { token.agent.project }
......
......@@ -4,6 +4,7 @@ require 'spec_helper'
RSpec.describe ComplianceManagement::FrameworkPolicy do
let_it_be_with_refind(:framework) { create(:compliance_framework) }
let(:user) { framework.namespace.owner }
subject { described_class.new(user, framework) }
......
......@@ -423,6 +423,7 @@ RSpec.describe GroupPolicy do
context 'when the group is a subgroup' do
let_it_be(:subgroup) { create(:group, :private, parent: group) }
let(:current_user) { owner }
subject { described_class.new(current_user, subgroup) }
......
......@@ -140,6 +140,7 @@ RSpec.describe MergeRequestPolicy do
let_it_be(:user) { create :user }
let(:protected_branch) { create(:protected_branch, project: project, name: branch_name, code_owner_approval_required: true) }
let_it_be(:approver_group) { create(:group) }
let(:merge_request) { create(:merge_request, source_project: project, target_project: project, target_branch: branch_name) }
before do
......
......@@ -553,6 +553,7 @@ RSpec.describe ProjectPolicy do
describe 'permissions for security bot' do
let_it_be(:current_user) { create(:user, :security_bot) }
let(:project) { private_project }
let(:permissions) do
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Vulnerabilities::IssueLinkPolicy do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project, namespace: user.namespace) }
let(:vulnerability) { create(:vulnerability, project: project) }
let(:issue) { create(:issue, project: project) }
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