Commit 16e75b24 authored by Vitali Tatarintev's avatar Vitali Tatarintev

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

Fix RSpec/EmptyLineAfterFinalLetItBe for ee/spec/graphql/mutations

See merge request gitlab-org/gitlab!58390
parents 2503c31b 719b1c3d
......@@ -398,23 +398,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- ee/spec/features/markdown/metrics_spec.rb
- ee/spec/features/registrations/group_invites_during_signup_flow_spec.rb
- ee/spec/features/subscriptions_spec.rb
- ee/spec/graphql/ee/mutations/concerns/mutations/resolves_issuable_spec.rb
- ee/spec/graphql/mutations/boards/update_epic_user_preferences_spec.rb
- ee/spec/graphql/mutations/clusters/agent_tokens/create_spec.rb
- ee/spec/graphql/mutations/compliance_management/frameworks/create_spec.rb
- ee/spec/graphql/mutations/compliance_management/frameworks/destroy_spec.rb
- ee/spec/graphql/mutations/compliance_management/frameworks/update_spec.rb
- ee/spec/graphql/mutations/dast_scanner_profiles/delete_spec.rb
- ee/spec/graphql/mutations/epics/add_issue_spec.rb
- ee/spec/graphql/mutations/gitlab_subscriptions/activate_spec.rb
- ee/spec/graphql/mutations/incident_management/oncall_rotation/create_spec.rb
- ee/spec/graphql/mutations/incident_management/oncall_rotation/destroy_spec.rb
- ee/spec/graphql/mutations/incident_management/oncall_schedule/create_spec.rb
- ee/spec/graphql/mutations/incident_management/oncall_schedule/destroy_spec.rb
- ee/spec/graphql/mutations/incident_management/oncall_schedule/update_spec.rb
- ee/spec/graphql/mutations/issues/set_epic_spec.rb
- ee/spec/graphql/mutations/requirements_management/export_requirements_spec.rb
- ee/spec/graphql/mutations/vulnerabilities/create_external_issue_link_spec.rb
- ee/spec/graphql/types/issue_type_spec.rb
- ee/spec/helpers/ee/graph_helper_spec.rb
- ee/spec/helpers/ee/issues_helper_spec.rb
......
---
title: Fix RSpec/EmptyLineAfterFinalLetItBe rubocop offenses in ee/spec/graphsql/mutations
merge_request: 58390
author: Abdul Wadood @abdulwd
type: fixed
......@@ -13,6 +13,7 @@ RSpec.describe Mutations::ResolvesIssuable do
let_it_be(:user) { create(:user) }
let_it_be(:context) { { current_user: user } }
let_it_be(:epic) { create(:epic, group: group) }
let(:mutation) { mutation_class.new(object: nil, context: context, field: nil) }
context 'with epics' do
......
......@@ -8,6 +8,7 @@ RSpec.describe Mutations::Boards::UpdateEpicUserPreferences do
let_it_be(:user) { create(:user) }
let_it_be(:board) { create(:board, project: project) }
let_it_be(:epic) { create(:epic, group: group) }
let(:context) { { current_user: user } }
subject(:mutation) { described_class.new(object: nil, context: context, field: nil).resolve(**mutation_params) }
......
......@@ -7,6 +7,7 @@ RSpec.describe Mutations::Clusters::AgentTokens::Create do
let_it_be(:cluster_agent) { create(:cluster_agent) }
let_it_be(:user) { create(:user) }
let(:context) do
GraphQL::Query::Context.new(
query: OpenStruct.new(schema: nil),
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Mutations::ComplianceManagement::Frameworks::Create do
let_it_be(:current_user) { create(:user) }
let_it_be(:namespace) { create(:namespace) }
let(:params) { valid_params }
let(:mutation) { described_class.new(object: nil, context: { current_user: current_user }, field: nil) }
......
......@@ -6,6 +6,7 @@ RSpec.describe Mutations::ComplianceManagement::Frameworks::Destroy do
include GraphqlHelpers
let_it_be(:framework) { create(:compliance_framework) }
let(:user) { framework.namespace.owner }
let(:mutation) { described_class.new(object: nil, context: { current_user: user }, field: nil) }
......
......@@ -6,6 +6,7 @@ RSpec.describe Mutations::ComplianceManagement::Frameworks::Update do
include GraphqlHelpers
let_it_be(:framework) { create(:compliance_framework) }
let(:user) { framework.namespace.owner }
let(:mutation) { described_class.new(object: nil, context: { current_user: user }, field: nil) }
let(:params) do
......
......@@ -7,6 +7,7 @@ RSpec.describe Mutations::DastScannerProfiles::Delete do
let_it_be(:user) { create(:user) }
let_it_be(:full_path) { project.full_path }
let_it_be(:dast_scanner_profile) { create(:dast_scanner_profile, project: project) }
let(:dast_scanner_profile_id) { dast_scanner_profile.to_global_id }
subject(:mutation) { described_class.new(object: nil, context: { current_user: user }, field: nil) }
......
......@@ -6,6 +6,7 @@ RSpec.describe Mutations::Epics::AddIssue do
let_it_be(:group) { create(:group) }
let_it_be(:project) { create(:project, namespace: group) }
let_it_be(:epic) { create(:epic, group: group) }
let(:user) { issue.author }
let(:issue) { create(:issue, project: project) }
......
......@@ -9,6 +9,7 @@ RSpec.describe Mutations::GitlabSubscriptions::Activate do
let_it_be(:user) { create(:admin) }
let_it_be(:created_license) { License.last }
let(:activation_code) { 'activation_code' }
let(:result) { { success: true, license: created_license } }
......
......@@ -6,6 +6,7 @@ RSpec.describe Mutations::IncidentManagement::OncallRotation::Create do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:schedule) { create(:incident_management_oncall_schedule, project: project) }
let(:args) do
{
project_path: project.full_path,
......
......@@ -7,6 +7,7 @@ RSpec.describe Mutations::IncidentManagement::OncallRotation::Destroy do
let_it_be_with_refind(:project) { create(:project) }
let_it_be(:schedule) { create(:incident_management_oncall_schedule, project: project) }
let_it_be(:rotation) { create(:incident_management_oncall_rotation, schedule: schedule) }
let(:args) do
{
project_path: project.full_path,
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Mutations::IncidentManagement::OncallSchedule::Create do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let(:args) do
{
project_path: project.full_path,
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Mutations::IncidentManagement::OncallSchedule::Destroy do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let(:oncall_schedule) { create(:incident_management_oncall_schedule, project: project) }
let(:args) { { project_path: project.full_path, iid: oncall_schedule.iid.to_s } }
......
......@@ -6,6 +6,7 @@ RSpec.describe Mutations::IncidentManagement::OncallSchedule::Update do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:oncall_schedule) { create(:incident_management_oncall_schedule, project: project) }
let(:args) do
{
project_path: project.full_path,
......
......@@ -12,6 +12,7 @@ RSpec.describe Mutations::Issues::SetEpic do
describe '#resolve' do
let_it_be_with_reload(:epic) { create(:epic, group: group) }
let(:mutated_issue) { subject[:issue] }
subject { mutation.resolve(project_path: issue.project.full_path, iid: issue.iid, epic: epic) }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Mutations::RequirementsManagement::ExportRequirements do
let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) }
let(:fields) { [] }
let(:args) do
{
......
......@@ -44,6 +44,7 @@ RSpec.describe Mutations::Vulnerabilities::CreateExternalIssueLink do
context 'when issue creation succeeds' do
let_it_be(:external_issue_link) { build(:vulnerabilities_external_issue_link) }
let(:result) { double(success?: true, payload: { record: external_issue_link }, errors: []) }
it 'returns empty external issue link' 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