Commit a95d3605 authored by Abdul Wadood's avatar Abdul Wadood

Fix in RSpec/EmptyLineAfterFinalLetItBe for vulnerability services

Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/325836
parent 143bbd46
......@@ -816,15 +816,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- ee/spec/services/status_page/unpublish_details_service_spec.rb
- ee/spec/services/timebox_report_service_spec.rb
- ee/spec/services/todo_service_spec.rb
- ee/spec/services/vulnerabilities/confirm_service_spec.rb
- ee/spec/services/vulnerabilities/create_service_spec.rb
- ee/spec/services/vulnerabilities/dismiss_service_spec.rb
- ee/spec/services/vulnerabilities/resolve_service_spec.rb
- ee/spec/services/vulnerabilities/revert_to_detected_service_spec.rb
- ee/spec/services/vulnerabilities/update_service_spec.rb
- ee/spec/services/vulnerability_exports/create_service_spec.rb
- ee/spec/services/vulnerability_external_issue_links/destroy_service_spec.rb
- ee/spec/services/vulnerability_issue_links/delete_service_spec.rb
- ee/spec/support/shared_examples/graphql/geo/geo_registries_resolver_shared_examples.rb
- ee/spec/support/shared_examples/graphql/mutations/set_multiple_assignees_shared_examples.rb
- ee/spec/support/shared_examples/quick_actions/issue/status_page_quick_actions_shared_examples.rb
......
......@@ -10,6 +10,7 @@ RSpec.describe Vulnerabilities::ConfirmService do
end
let_it_be(:user) { create(:user) }
let(:project) { create(:project) } # cannot use let_it_be here: caching causes problems with permission-related tests
let(:vulnerability) { create(:vulnerability, :with_findings, project: project) }
let(:service) { described_class.new(user, vulnerability) }
......
......@@ -8,6 +8,7 @@ RSpec.describe Vulnerabilities::CreateService do
end
let_it_be(:user) { create(:user) }
let(:project) { create(:project) } # cannot use let_it_be here: caching causes problems with permission-related tests
let(:finding) { create(:vulnerabilities_finding, name: finding_name, project: project) }
let(:finding_id) { finding.id }
......
......@@ -10,6 +10,7 @@ RSpec.describe Vulnerabilities::DismissService do
end
let_it_be(:user) { create(:user) }
let(:project) { create(:project) } # cannot use let_it_be here: caching causes problems with permission-related tests
let!(:pipeline) { create(:ci_pipeline, :success, project: project) }
let!(:build) { create(:ee_ci_build, :sast, pipeline: pipeline) }
......
......@@ -10,6 +10,7 @@ RSpec.describe Vulnerabilities::ResolveService do
end
let_it_be(:user) { create(:user) }
let(:project) { create(:project) } # cannot use let_it_be here: caching causes problems with permission-related tests
let(:vulnerability) { create(:vulnerability, project: project) }
let(:service) { described_class.new(user, vulnerability) }
......
......@@ -10,6 +10,7 @@ RSpec.describe Vulnerabilities::RevertToDetectedService do
end
let_it_be(:user) { create(:user) }
let(:project) { create(:project) } # cannot use let_it_be here: caching causes problems with permission-related tests
let(:vulnerability) { create(:vulnerability, :with_findings, project: project) }
let(:service) { described_class.new(user, vulnerability) }
......
......@@ -8,6 +8,7 @@ RSpec.describe Vulnerabilities::UpdateService do
end
let_it_be(:user) { create(:user) }
let!(:project) { create(:project) } # cannot use let_it_be here: caching causes problems with permission-related tests
let!(:updated_finding) { create(:vulnerabilities_finding, project: project, name: finding_name, severity: :critical, confidence: :confirmed, vulnerability: vulnerability) }
......
......@@ -10,6 +10,7 @@ RSpec.describe VulnerabilityExports::CreateService do
end
let_it_be(:user) { create(:user, :auditor) }
let(:group) { create(:group) }
let(:project) { create(:project, :public, group: group) }
let(:format) { 'csv' }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe VulnerabilityExternalIssueLinks::DestroyService do
let_it_be(:project) { create(:project) }
let_it_be(:vulnerability_external_issue_link, refind: true) { create(:vulnerabilities_external_issue_link, project: project) }
let(:service) { described_class.new(vulnerability_external_issue_link) }
subject(:delete_external_issue_link) { service.execute }
......
......@@ -12,6 +12,7 @@ RSpec.describe VulnerabilityIssueLinks::DeleteService do
let_it_be(:project) { create(:project) }
let_it_be(:user) { create(:user) }
let_it_be(:vulnerability_issue_link, refind: true) { create(:vulnerabilities_issue_link, project: project) }
let(:service) { described_class.new(user, vulnerability_issue_link) }
subject(:delete_issue_link) { service.execute }
......
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