Commit 448ac71e authored by Huzaifa Iftikhar's avatar Huzaifa Iftikhar Committed by Arturo Herrero

Fix EmptyLineAfterFinalLetItBe offenses for alert management module

Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/325836
parent 0c0f7bb9
......@@ -614,16 +614,6 @@ RSpec/EmptyLineAfterFinalLetItBe:
- spec/frontend/fixtures/pipelines.rb
- spec/graphql/features/authorization_spec.rb
- spec/graphql/gitlab_schema_spec.rb
- spec/graphql/mutations/alert_management/alerts/todo/create_spec.rb
- spec/graphql/mutations/alert_management/create_alert_issue_spec.rb
- spec/graphql/mutations/alert_management/http_integration/create_spec.rb
- spec/graphql/mutations/alert_management/http_integration/destroy_spec.rb
- spec/graphql/mutations/alert_management/http_integration/reset_token_spec.rb
- spec/graphql/mutations/alert_management/http_integration/update_spec.rb
- spec/graphql/mutations/alert_management/prometheus_integration/create_spec.rb
- spec/graphql/mutations/alert_management/prometheus_integration/reset_token_spec.rb
- spec/graphql/mutations/alert_management/prometheus_integration/update_spec.rb
- spec/graphql/mutations/alert_management/update_alert_status_spec.rb
- spec/graphql/mutations/boards/lists/update_spec.rb
- spec/graphql/mutations/custom_emoji/create_spec.rb
- spec/graphql/mutations/discussions/toggle_resolve_spec.rb
......
......@@ -7,6 +7,7 @@ RSpec.describe Mutations::AlertManagement::Alerts::Todo::Create do
let_it_be(:alert) { create(:alert_management_alert) }
let_it_be(:project) { alert.project }
let(:current_user) { project.owner }
let(:args) { { project_path: project.full_path, iid: alert.iid } }
......
......@@ -6,6 +6,7 @@ RSpec.describe Mutations::AlertManagement::CreateAlertIssue do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:alert) { create(:alert_management_alert, project: project, status: 'triggered') }
let(:args) { { project_path: project.full_path, iid: alert.iid } }
specify { expect(described_class).to require_graphql_authorizations(:update_alert_management_alert) }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Mutations::AlertManagement::HttpIntegration::Create do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let(:args) { { project_path: project.full_path, active: true, name: 'HTTP Integration' } }
specify { expect(described_class).to require_graphql_authorizations(:admin_operations) }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Mutations::AlertManagement::HttpIntegration::Destroy do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let(:integration) { create(:alert_management_http_integration, project: project) }
let(:args) { { id: GitlabSchema.id_from_object(integration) } }
......
......@@ -6,6 +6,7 @@ RSpec.describe Mutations::AlertManagement::HttpIntegration::ResetToken do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:integration) { create(:alert_management_http_integration, project: project) }
let(:args) { { id: GitlabSchema.id_from_object(integration) } }
specify { expect(described_class).to require_graphql_authorizations(:admin_operations) }
......
......@@ -6,6 +6,7 @@ RSpec.describe Mutations::AlertManagement::HttpIntegration::Update do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:integration) { create(:alert_management_http_integration, project: project) }
let(:args) { { id: GitlabSchema.id_from_object(integration), active: false, name: 'New Name' } }
specify { expect(described_class).to require_graphql_authorizations(:admin_operations) }
......
......@@ -5,6 +5,7 @@ require 'spec_helper'
RSpec.describe Mutations::AlertManagement::PrometheusIntegration::Create do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let(:args) { { project_path: project.full_path, active: true, api_url: 'http://prometheus.com/' } }
specify { expect(described_class).to require_graphql_authorizations(:admin_project) }
......
......@@ -6,6 +6,7 @@ RSpec.describe Mutations::AlertManagement::PrometheusIntegration::ResetToken do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:integration) { create(:prometheus_service, project: project) }
let(:args) { { id: GitlabSchema.id_from_object(integration) } }
specify { expect(described_class).to require_graphql_authorizations(:admin_project) }
......
......@@ -6,6 +6,7 @@ RSpec.describe Mutations::AlertManagement::PrometheusIntegration::Update do
let_it_be(:current_user) { create(:user) }
let_it_be(:project) { create(:project) }
let_it_be(:integration) { create(:prometheus_service, project: project) }
let(:args) { { id: GitlabSchema.id_from_object(integration), active: false, api_url: 'http://new-url.com' } }
specify { expect(described_class).to require_graphql_authorizations(:admin_project) }
......
......@@ -6,6 +6,7 @@ RSpec.describe Mutations::AlertManagement::UpdateAlertStatus do
let_it_be(:current_user) { create(:user) }
let_it_be(:alert) { create(:alert_management_alert, :triggered) }
let_it_be(:project) { alert.project }
let(:new_status) { Types::AlertManagement::StatusEnum.values['ACKNOWLEDGED'].value }
let(:args) { { status: new_status, project_path: project.full_path, iid: alert.iid } }
......
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